├── assets ├── a.txt ├── spiral.gif ├── square.gif ├── triangle.gif └── roboML class diagram.png ├── model ├── roboML.png └── RoboMLProgram.xmi ├── plugin.properties ├── bin └── roboML │ ├── Loop.class │ ├── Speed.class │ ├── Unit.class │ ├── Entity.class │ ├── Sensor.class │ ├── Condition.class │ ├── Direction.class │ ├── Function.class │ ├── GetValue.class │ ├── Movement.class │ ├── RMLObject.class │ ├── Rotation.class │ ├── SetValue.class │ ├── Statement.class │ ├── TimeSensor.class │ ├── Variable.class │ ├── Assignement.class │ ├── Deplacement.class │ ├── FunctionCall.class │ ├── NewEClass12.class │ ├── UnitMeasure.class │ ├── VariableRef.class │ ├── DistanceSensor.class │ ├── RoboMLFactory.class │ ├── RoboMLPackage.class │ ├── RoboMLProgram.class │ ├── impl │ ├── EntityImpl.class │ ├── LoopImpl.class │ ├── SensorImpl.class │ ├── SpeedImpl.class │ ├── UnitImpl.class │ ├── FunctionImpl.class │ ├── GetValueImpl.class │ ├── MovementImpl.class │ ├── RotationImpl.class │ ├── SetValueImpl.class │ ├── VariableImpl.class │ ├── AssignementImpl.class │ ├── ConditionImpl.class │ ├── DeplacementImpl.class │ ├── NewEClass12Impl.class │ ├── StatementImpl.class │ ├── TimeSensorImpl.class │ ├── VariableRefImpl.class │ ├── FunctionCallImpl.class │ ├── RoboMLFactoryImpl.class │ ├── RoboMLPackageImpl.class │ ├── RoboMLProgramImpl.class │ ├── DistanceSensorImpl.class │ ├── BooleanExpressionImpl.class │ └── ArithmeticExpressionImpl.class │ ├── BooleanExpression.class │ ├── BooleanOperators.class │ ├── util │ ├── RoboMLSwitch.class │ ├── RoboMLAdapterFactory.class │ └── RoboMLAdapterFactory$1.class │ ├── ArithmeticExpression.class │ ├── ArithmeticOperators.class │ └── RoboMLPackage$Literals.class ├── .settings └── org.eclipse.core.resources.prefs ├── langium └── Robot_ML │ ├── .vscodeignore │ ├── bin │ └── cli.js │ ├── compile.sh │ ├── compile.bat │ ├── .gitignore │ ├── src │ ├── language │ │ ├── semantics │ │ │ ├── compiler │ │ │ │ ├── ArduinoExample │ │ │ │ │ ├── lib │ │ │ │ │ │ ├── PID_Beta6 │ │ │ │ │ │ │ ├── PID_Beta6.o │ │ │ │ │ │ │ ├── Examples │ │ │ │ │ │ │ │ ├── PIDSample │ │ │ │ │ │ │ │ │ └── PIDSample.pde │ │ │ │ │ │ │ │ ├── PIDSample2 │ │ │ │ │ │ │ │ │ └── PIDSample2.pde │ │ │ │ │ │ │ │ └── PIDSample3 │ │ │ │ │ │ │ │ │ └── PIDSample3.pde │ │ │ │ │ │ │ ├── keywords.txt │ │ │ │ │ │ │ └── fuzzy_table.h │ │ │ │ │ │ ├── PinChangeInt │ │ │ │ │ │ │ ├── .DS_Store │ │ │ │ │ │ │ └── PinChangeIntConfig.h │ │ │ │ │ │ ├── EEPROM │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ │ ├── eeprom_clear │ │ │ │ │ │ │ │ │ └── eeprom_clear.ino │ │ │ │ │ │ │ │ ├── eeprom_write │ │ │ │ │ │ │ │ │ └── eeprom_write.ino │ │ │ │ │ │ │ │ └── eeprom_read │ │ │ │ │ │ │ │ │ └── eeprom_read.ino │ │ │ │ │ │ │ ├── keywords.txt │ │ │ │ │ │ │ ├── EEPROM.h │ │ │ │ │ │ │ └── EEPROM.cpp │ │ │ │ │ │ ├── Wire │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ │ ├── master_writer │ │ │ │ │ │ │ │ │ └── master_writer.pde │ │ │ │ │ │ │ │ ├── slave_sender │ │ │ │ │ │ │ │ │ └── slave_sender.pde │ │ │ │ │ │ │ │ ├── master_reader │ │ │ │ │ │ │ │ │ └── master_reader.pde │ │ │ │ │ │ │ │ ├── digital_potentiometer │ │ │ │ │ │ │ │ │ └── digital_potentiometer.pde │ │ │ │ │ │ │ │ └── slave_receiver │ │ │ │ │ │ │ │ │ └── slave_receiver.pde │ │ │ │ │ │ │ ├── keywords.txt │ │ │ │ │ │ │ ├── utility │ │ │ │ │ │ │ │ └── twi.h │ │ │ │ │ │ │ └── Wire.h │ │ │ │ │ │ └── MotorWheel │ │ │ │ │ │ │ ├── diff.log │ │ │ │ │ │ │ └── Omni3WD.h │ │ │ │ │ └── program │ │ │ │ │ │ └── RB0021_Omni4WD_PID │ │ │ │ │ │ └── RB0021_Omni4WD_PID.ino │ │ │ │ └── compiler.ts │ │ │ └── interpreter │ │ │ │ └── src │ │ │ │ ├── static │ │ │ │ ├── simulator │ │ │ │ │ ├── wall.js │ │ │ │ │ ├── block.js │ │ │ │ │ ├── ray.js │ │ │ │ │ ├── robot.js │ │ │ │ │ └── sketch.js │ │ │ │ └── index.html │ │ │ │ └── web │ │ │ │ └── simulator │ │ │ │ ├── scene.ts │ │ │ │ └── entities.ts │ │ ├── Terminals.langium │ │ ├── robo-ml-validator.js.map │ │ ├── main.ts │ │ ├── generated │ │ │ └── module.ts │ │ ├── robo-ml-validator.ts │ │ ├── interpretor │ │ │ └── interpreorts │ │ ├── validator │ │ │ └── validator.ts │ │ └── robo-ml-module.ts │ ├── web │ │ ├── app.ts │ │ └── simulator │ │ │ ├── scene.ts │ │ │ └── entities.ts │ ├── static │ │ ├── simulator │ │ │ ├── wall.js │ │ │ ├── block.js │ │ │ ├── ray.js │ │ │ ├── robot.js │ │ │ └── sketch.js │ │ ├── signals.js │ │ └── easter-egg.js │ ├── cli │ │ ├── main.ts │ │ └── cli-util.ts │ └── extension │ │ └── main.ts │ ├── .eslintrc.json │ ├── .vscode │ ├── extensions.json │ ├── tasks.json │ └── launch.json │ ├── langium-config.json │ ├── files │ ├── triangle.rml │ ├── square.rml │ ├── spiral.rml │ ├── test.rml │ ├── square.ino │ ├── spiral.ino │ └── triangle.ino │ ├── tsconfig.json │ ├── tsconfig.monarch.json │ ├── language-configuration.json │ ├── esbuild.mjs │ └── langium-quickstart.md ├── org.xtext.example.mydsl.copy └── org.xtext.example.mydsl │ ├── .settings │ ├── org.eclipse.core.resources.prefs │ └── org.eclipse.jdt.core.prefs │ ├── .antlr-generator-3.2.0-patch.jar │ ├── bin │ └── org │ │ └── xtext │ │ └── example │ │ └── mydsl │ │ ├── MyDsl.xtextbin │ │ ├── MyDslRuntimeModule.class │ │ ├── MyDslStandaloneSetup.class │ │ ├── generator │ │ ├── MyDslGenerator.class │ │ ├── .MyDslGenerator.xtendbin │ │ ├── .MyDslGenerator.java._trace │ │ └── MyDslGenerator.xtend │ │ ├── parser │ │ └── antlr │ │ │ ├── MyDslParser.class │ │ │ ├── MyDslAntlrTokenFileProvider.class │ │ │ └── internal │ │ │ ├── InternalMyDslLexer.class │ │ │ ├── InternalMyDslParser.class │ │ │ ├── InternalMyDslLexer$DFA12.class │ │ │ └── InternalMyDsl.tokens │ │ ├── validation │ │ ├── MyDslValidator.class │ │ ├── AbstractMyDslValidator.class │ │ └── MyDslConfigurableIssueCodesProvider.class │ │ ├── AbstractMyDslRuntimeModule.class │ │ ├── formatting2 │ │ ├── MyDslFormatter.class │ │ ├── .MyDslFormatter.xtendbin │ │ ├── .MyDslFormatter.java._trace │ │ └── MyDslFormatter.xtend │ │ ├── scoping │ │ ├── MyDslScopeProvider.class │ │ └── AbstractMyDslScopeProvider.class │ │ ├── services │ │ ├── MyDslGrammarAccess.class │ │ ├── MyDslGrammarAccess$LoopElements.class │ │ ├── MyDslGrammarAccess$UnitElements.class │ │ ├── MyDslGrammarAccess$EntityElements.class │ │ ├── MyDslGrammarAccess$ConditionElements.class │ │ ├── MyDslGrammarAccess$DirectionElements.class │ │ ├── MyDslGrammarAccess$EStringElements.class │ │ ├── MyDslGrammarAccess$FunctionElements.class │ │ ├── MyDslGrammarAccess$GetValueElements.class │ │ ├── MyDslGrammarAccess$RMLObjectElements.class │ │ ├── MyDslGrammarAccess$RotationElements.class │ │ ├── MyDslGrammarAccess$SetValueElements.class │ │ ├── MyDslGrammarAccess$StatementElements.class │ │ ├── MyDslGrammarAccess$VariableElements.class │ │ ├── MyDslGrammarAccess$AssignementElements.class │ │ ├── MyDslGrammarAccess$DeplacementElements.class │ │ ├── MyDslGrammarAccess$Entity_ImplElements.class │ │ ├── MyDslGrammarAccess$UnitMeasureElements.class │ │ ├── MyDslGrammarAccess$VariableRefElements.class │ │ ├── MyDslGrammarAccess$FunctionCallElements.class │ │ ├── MyDslGrammarAccess$RoboMLProgramElements.class │ │ ├── MyDslGrammarAccess$ArithmeticOperatorsElements.class │ │ └── MyDslGrammarAccess$ArithmeticExpressionElements.class │ │ ├── MyDslStandaloneSetupGenerated.class │ │ ├── serializer │ │ ├── MyDslSemanticSequencer.class │ │ └── MyDslSyntacticSequencer.class │ │ └── GenerateMyDsl.mwe2 │ ├── src-gen │ └── org │ │ └── xtext │ │ └── example │ │ └── mydsl │ │ ├── MyDsl.xtextbin │ │ ├── scoping │ │ └── AbstractMyDslScopeProvider.java │ │ ├── parser │ │ └── antlr │ │ │ ├── MyDslAntlrTokenFileProvider.java │ │ │ ├── MyDslParser.java │ │ │ └── internal │ │ │ └── InternalMyDsl.tokens │ │ ├── validation │ │ ├── AbstractMyDslValidator.java │ │ └── MyDslConfigurableIssueCodesProvider.java │ │ ├── MyDslStandaloneSetupGenerated.java │ │ └── serializer │ │ └── MyDslSyntacticSequencer.java │ ├── xtend-gen │ └── org │ │ └── xtext │ │ └── example │ │ └── mydsl │ │ ├── generator │ │ ├── .MyDslGenerator.xtendbin │ │ ├── .MyDslGenerator.java._trace │ │ └── MyDslGenerator.java │ │ └── formatting2 │ │ ├── .MyDslFormatter.xtendbin │ │ ├── .MyDslFormatter.java._trace │ │ └── MyDslFormatter.java │ ├── src │ └── org │ │ └── xtext │ │ └── example │ │ └── mydsl │ │ ├── MyDslRuntimeModule.java │ │ ├── scoping │ │ └── MyDslScopeProvider.java │ │ ├── MyDslStandaloneSetup.java │ │ ├── validation │ │ └── MyDslValidator.java │ │ ├── generator │ │ └── MyDslGenerator.xtend │ │ ├── formatting2 │ │ └── MyDslFormatter.xtend │ │ └── GenerateMyDsl.mwe2 │ ├── .classpath │ ├── langium │ └── Terminals.langium │ ├── build.properties │ ├── META-INF │ └── MANIFEST.MF │ ├── .project │ └── .launch │ ├── Generate MyDsl (mydsl) Language Infrastructure.launch │ └── Launch Runtime Eclipse.launch ├── src-gen └── roboML │ ├── GetValue.java │ ├── TimeSensor.java │ ├── VariableRef.java │ ├── DistanceSensor.java │ ├── NewEClass12.java │ ├── Statement.java │ ├── impl │ ├── GetValueImpl.java │ ├── TimeSensorImpl.java │ ├── VariableRefImpl.java │ ├── DistanceSensorImpl.java │ ├── StatementImpl.java │ └── NewEClass12Impl.java │ ├── RoboMLProgram.java │ ├── FunctionCall.java │ ├── SetValue.java │ ├── Unit.java │ ├── Entity.java │ ├── Movement.java │ ├── Rotation.java │ ├── Assignement.java │ ├── Sensor.java │ ├── Speed.java │ ├── Loop.java │ ├── Variable.java │ ├── Condition.java │ └── Deplacement.java ├── .classpath ├── plugin.xml ├── META-INF └── MANIFEST.MF ├── .project └── .github └── workflows └── deploy.yml /assets/a.txt: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /assets/spiral.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/assets/spiral.gif -------------------------------------------------------------------------------- /assets/square.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/assets/square.gif -------------------------------------------------------------------------------- /model/roboML.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/model/roboML.png -------------------------------------------------------------------------------- /plugin.properties: -------------------------------------------------------------------------------- 1 | # 2 | 3 | pluginName = RoboML 4 | providerName = www.example.org 5 | -------------------------------------------------------------------------------- /assets/triangle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/assets/triangle.gif -------------------------------------------------------------------------------- /bin/roboML/Loop.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Loop.class -------------------------------------------------------------------------------- /bin/roboML/Speed.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Speed.class -------------------------------------------------------------------------------- /bin/roboML/Unit.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Unit.class -------------------------------------------------------------------------------- /bin/roboML/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Entity.class -------------------------------------------------------------------------------- /bin/roboML/Sensor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Sensor.class -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /bin/roboML/Condition.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Condition.class -------------------------------------------------------------------------------- /bin/roboML/Direction.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Direction.class -------------------------------------------------------------------------------- /bin/roboML/Function.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Function.class -------------------------------------------------------------------------------- /bin/roboML/GetValue.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/GetValue.class -------------------------------------------------------------------------------- /bin/roboML/Movement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Movement.class -------------------------------------------------------------------------------- /bin/roboML/RMLObject.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/RMLObject.class -------------------------------------------------------------------------------- /bin/roboML/Rotation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Rotation.class -------------------------------------------------------------------------------- /bin/roboML/SetValue.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/SetValue.class -------------------------------------------------------------------------------- /bin/roboML/Statement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Statement.class -------------------------------------------------------------------------------- /bin/roboML/TimeSensor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/TimeSensor.class -------------------------------------------------------------------------------- /bin/roboML/Variable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Variable.class -------------------------------------------------------------------------------- /langium/Robot_ML/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | .gitignore 4 | langium-quickstart.md 5 | -------------------------------------------------------------------------------- /langium/Robot_ML/bin/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import main from '../out/cli/main.js'; 3 | main(); 4 | -------------------------------------------------------------------------------- /bin/roboML/Assignement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Assignement.class -------------------------------------------------------------------------------- /bin/roboML/Deplacement.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/Deplacement.class -------------------------------------------------------------------------------- /bin/roboML/FunctionCall.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/FunctionCall.class -------------------------------------------------------------------------------- /bin/roboML/NewEClass12.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/NewEClass12.class -------------------------------------------------------------------------------- /bin/roboML/UnitMeasure.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/UnitMeasure.class -------------------------------------------------------------------------------- /bin/roboML/VariableRef.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/VariableRef.class -------------------------------------------------------------------------------- /langium/Robot_ML/compile.sh: -------------------------------------------------------------------------------- 1 | npm run langium:generate && npm run build && node ./bin/cli.js compile .\test.rml 2 | -------------------------------------------------------------------------------- /assets/roboML class diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/assets/roboML class diagram.png -------------------------------------------------------------------------------- /bin/roboML/DistanceSensor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/DistanceSensor.class -------------------------------------------------------------------------------- /bin/roboML/RoboMLFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/RoboMLFactory.class -------------------------------------------------------------------------------- /bin/roboML/RoboMLPackage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/RoboMLPackage.class -------------------------------------------------------------------------------- /bin/roboML/RoboMLProgram.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/RoboMLProgram.class -------------------------------------------------------------------------------- /bin/roboML/impl/EntityImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/EntityImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/LoopImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/LoopImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/SensorImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/SensorImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/SpeedImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/SpeedImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/UnitImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/UnitImpl.class -------------------------------------------------------------------------------- /bin/roboML/BooleanExpression.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/BooleanExpression.class -------------------------------------------------------------------------------- /bin/roboML/BooleanOperators.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/BooleanOperators.class -------------------------------------------------------------------------------- /bin/roboML/impl/FunctionImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/FunctionImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/GetValueImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/GetValueImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/MovementImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/MovementImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/RotationImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/RotationImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/SetValueImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/SetValueImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/VariableImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/VariableImpl.class -------------------------------------------------------------------------------- /bin/roboML/util/RoboMLSwitch.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/util/RoboMLSwitch.class -------------------------------------------------------------------------------- /bin/roboML/ArithmeticExpression.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/ArithmeticExpression.class -------------------------------------------------------------------------------- /bin/roboML/ArithmeticOperators.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/ArithmeticOperators.class -------------------------------------------------------------------------------- /bin/roboML/impl/AssignementImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/AssignementImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/ConditionImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/ConditionImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/DeplacementImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/DeplacementImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/NewEClass12Impl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/NewEClass12Impl.class -------------------------------------------------------------------------------- /bin/roboML/impl/StatementImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/StatementImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/TimeSensorImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/TimeSensorImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/VariableRefImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/VariableRefImpl.class -------------------------------------------------------------------------------- /bin/roboML/RoboMLPackage$Literals.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/RoboMLPackage$Literals.class -------------------------------------------------------------------------------- /bin/roboML/impl/FunctionCallImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/FunctionCallImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/RoboMLFactoryImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/RoboMLFactoryImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/RoboMLPackageImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/RoboMLPackageImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/RoboMLProgramImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/RoboMLProgramImpl.class -------------------------------------------------------------------------------- /bin/roboML/impl/DistanceSensorImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/DistanceSensorImpl.class -------------------------------------------------------------------------------- /bin/roboML/util/RoboMLAdapterFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/util/RoboMLAdapterFactory.class -------------------------------------------------------------------------------- /bin/roboML/impl/BooleanExpressionImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/BooleanExpressionImpl.class -------------------------------------------------------------------------------- /bin/roboML/util/RoboMLAdapterFactory$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/util/RoboMLAdapterFactory$1.class -------------------------------------------------------------------------------- /langium/Robot_ML/compile.bat: -------------------------------------------------------------------------------- 1 | call npm run langium:generate 2 | 3 | call npm run build 4 | 5 | call node ./bin/cli.js compile .\files\test.rml -------------------------------------------------------------------------------- /bin/roboML/impl/ArithmeticExpressionImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/bin/roboML/impl/ArithmeticExpressionImpl.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /langium/Robot_ML/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* 2 | !.vscode/extensions.json 3 | !.vscode/launch.json 4 | !.vscode/tasks.json 5 | node_modules/ 6 | out/ 7 | syntaxes/ 8 | public/* -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.antlr-generator-3.2.0-patch.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.antlr-generator-3.2.0-patch.jar -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/PID_Beta6.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/PID_Beta6.o -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PinChangeInt/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PinChangeInt/.DS_Store -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDsl.xtextbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDsl.xtextbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.xtextbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDsl.xtextbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslRuntimeModule.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslRuntimeModule.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslStandaloneSetup.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslStandaloneSetup.class -------------------------------------------------------------------------------- /langium/Robot_ML/src/web/app.ts: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | 3 | const app = express(); 4 | const port = 3000; 5 | app.use(express.static('./public')); 6 | app.listen(port, () => { console.log(`Server for RoboMl assets listening on http://localhost:${port}`)}); 7 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/MyDslGenerator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/MyDslGenerator.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/MyDslParser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/MyDslParser.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/MyDslValidator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/MyDslValidator.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/AbstractMyDslRuntimeModule.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/AbstractMyDslRuntimeModule.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/MyDslFormatter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/MyDslFormatter.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/scoping/MyDslScopeProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/scoping/MyDslScopeProvider.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess.class -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/simulator/wall.js: -------------------------------------------------------------------------------- 1 | class Wall { 2 | constructor(ax, ay, bx, by) { 3 | this.ax = ax; 4 | this.ay = ay; 5 | this.bx = bx; 6 | this.by = by; 7 | } 8 | 9 | show() { 10 | line(this.ax, this.ay, this.bx, this.by); 11 | } 12 | } -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/.MyDslFormatter.xtendbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/.MyDslFormatter.xtendbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/.MyDslGenerator.xtendbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/.MyDslGenerator.xtendbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/.MyDslGenerator.java._trace: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/.MyDslGenerator.java._trace -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/.MyDslFormatter.java._trace: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/.MyDslFormatter.java._trace -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/scoping/AbstractMyDslScopeProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/scoping/AbstractMyDslScopeProvider.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/AbstractMyDslValidator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/AbstractMyDslValidator.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/.MyDslGenerator.xtendbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/.MyDslGenerator.xtendbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/formatting2/.MyDslFormatter.xtendbin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/formatting2/.MyDslFormatter.xtendbin -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/.MyDslGenerator.java._trace: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/.MyDslGenerator.java._trace -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$LoopElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$LoopElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$UnitElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$UnitElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/formatting2/.MyDslFormatter.java._trace: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/formatting2/.MyDslFormatter.java._trace -------------------------------------------------------------------------------- /model/RoboMLProgram.xmi: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslParser.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslParser.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$EntityElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$EntityElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ConditionElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ConditionElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$DirectionElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$DirectionElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$EStringElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$EStringElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$FunctionElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$FunctionElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$GetValueElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$GetValueElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RMLObjectElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RMLObjectElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RotationElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RotationElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$SetValueElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$SetValueElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$StatementElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$StatementElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$VariableElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$VariableElements.class -------------------------------------------------------------------------------- /langium/Robot_ML/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "parserOptions": { 5 | "ecmaVersion": 6, 6 | "sourceType": "module" 7 | }, 8 | "plugins": [ 9 | "@typescript-eslint" 10 | ], 11 | "rules": { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/simulator/wall.js: -------------------------------------------------------------------------------- 1 | class Wall { 2 | constructor(ax, ay, bx, by) { 3 | this.ax = ax; 4 | this.ay = ay; 5 | this.bx = bx; 6 | this.by = by; 7 | } 8 | 9 | show() { 10 | line(this.ax, this.ay, this.bx, this.by); 11 | } 12 | } -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer$DFA12.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDslLexer$DFA12.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$AssignementElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$AssignementElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$DeplacementElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$DeplacementElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$Entity_ImplElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$Entity_ImplElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$UnitMeasureElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$UnitMeasureElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$VariableRefElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$VariableRefElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/MyDslConfigurableIssueCodesProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/validation/MyDslConfigurableIssueCodesProvider.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$FunctionCallElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$FunctionCallElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RoboMLProgramElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$RoboMLProgramElements.class -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/compiler.ts: -------------------------------------------------------------------------------- 1 | import { CompilerVisitor } from "./compilerVisitor.js"; 2 | 3 | export class Compile { 4 | static compileArduino(model: any): void { 5 | let compilerVisitor = new CompilerVisitor(); 6 | console.log(compilerVisitor.visitRoboMLProgram(model)); 7 | } 8 | } -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ArithmeticOperatorsElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ArithmeticOperatorsElements.class -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ArithmeticExpressionElements.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TPs-ESIR-S9/TP-ASE/main/org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/services/MyDslGrammarAccess$ArithmeticExpressionElements.class -------------------------------------------------------------------------------- /src-gen/roboML/GetValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Get Value'. 8 | * 9 | * 10 | * 11 | * @see roboML.RoboMLPackage#getGetValue() 12 | * @model 13 | * @generated 14 | */ 15 | public interface GetValue extends Entity { 16 | } // GetValue 17 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/scoping/AbstractMyDslScopeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.scoping; 5 | 6 | import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider; 7 | 8 | public abstract class AbstractMyDslScopeProvider extends DelegatingScopeProvider { 9 | } 10 | -------------------------------------------------------------------------------- /src-gen/roboML/TimeSensor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Time Sensor'. 8 | * 9 | * 10 | * 11 | * @see roboML.RoboMLPackage#getTimeSensor() 12 | * @model 13 | * @generated 14 | */ 15 | public interface TimeSensor extends Sensor { 16 | } // TimeSensor 17 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslRuntimeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl; 5 | 6 | 7 | /** 8 | * Use this class to register components to be used at runtime / without the Equinox extension registry. 9 | */ 10 | public class MyDslRuntimeModule extends AbstractMyDslRuntimeModule { 11 | } 12 | -------------------------------------------------------------------------------- /src-gen/roboML/VariableRef.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Variable Ref'. 8 | * 9 | * 10 | * 11 | * @see roboML.RoboMLPackage#getVariableRef() 12 | * @model 13 | * @generated 14 | */ 15 | public interface VariableRef extends Entity { 16 | 17 | } // VariableRef 18 | -------------------------------------------------------------------------------- /langium/Robot_ML/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | 5 | // List of extensions which should be recommended for users of this workspace. 6 | "recommendations": [ 7 | "langium.langium-vscode" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src-gen/roboML/DistanceSensor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Distance Sensor'. 8 | * 9 | * 10 | * 11 | * @see roboML.RoboMLPackage#getDistanceSensor() 12 | * @model 13 | * @generated 14 | */ 15 | public interface DistanceSensor extends Sensor { 16 | } // DistanceSensor 17 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src-gen/roboML/NewEClass12.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'New EClass12'. 10 | * 11 | * 12 | * 13 | * @see roboML.RoboMLPackage#getNewEClass12() 14 | * @model 15 | * @generated 16 | */ 17 | public interface NewEClass12 extends EObject { 18 | } // NewEClass12 19 | -------------------------------------------------------------------------------- /src-gen/roboML/Statement.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Statement'. 10 | * 11 | * 12 | * 13 | * @see roboML.RoboMLPackage#getStatement() 14 | * @model abstract="true" 15 | * @generated 16 | */ 17 | public interface Statement extends EObject { 18 | } // Statement 19 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/Terminals.langium: -------------------------------------------------------------------------------- 1 | 2 | terminal ID returns string:'^'? ('a' ..'z' | 'A' ..'Z' | '_' )('a' ..'z' | 'A' ..'Z' | '_' | '0' ..'9' )* ; 3 | terminal INT returns number:'0' ..'9' +; 4 | hidden terminal ML_COMMENT returns string:'/*' -> '*/' ; 5 | hidden terminal SL_COMMENT returns string:'//' !('\n' | '\r' )('\r'? '\n' )? ; 6 | hidden terminal WS returns string:(' ' | '\t' | '\r' | '\n' )+; 7 | terminal ANY_OTHER returns string:.; 8 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/robo-ml-validator.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"robo-ml-validator.js","sourceRoot":"","sources":["../../src/language/robo-ml-validator.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAwB;IAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC;IACxD,MAAM,SAAS,GAAG,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;IACtD,MAAM,MAAM,GAAoC;IAC5C,iDAAiD;KACpD,CAAC;IACF,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,eAAe;CAW3B"} -------------------------------------------------------------------------------- /langium/Robot_ML/langium-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "projectName": "RoboMl", 3 | "languages": [{ 4 | "id": "robo-ml", 5 | "grammar": "src/language/robo-ml.langium", 6 | "fileExtensions": [".rml"], 7 | "textMate": { 8 | "out": "syntaxes/robo-ml.tmLanguage.json" 9 | }, 10 | "monarch": { 11 | "out": "syntaxes/robo-ml.monarch.ts" 12 | } 13 | }], 14 | "out": "src/language/generated" 15 | } 16 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/scoping/MyDslScopeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.scoping; 5 | 6 | 7 | /** 8 | * This class contains custom scoping description. 9 | * 10 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping 11 | * on how and when to use it. 12 | */ 13 | public class MyDslScopeProvider extends AbstractMyDslScopeProvider { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDslStandaloneSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl; 5 | 6 | 7 | /** 8 | * Initialization support for running Xtext languages without Equinox extension registry. 9 | */ 10 | public class MyDslStandaloneSetup extends MyDslStandaloneSetupGenerated { 11 | 12 | public static void doSetup() { 13 | new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Bundle-ManifestVersion: 2 3 | Bundle-Name: %pluginName 4 | Bundle-SymbolicName: RoboML;singleton:=true 5 | Automatic-Module-Name: RoboML 6 | Bundle-Version: 0.1.0.qualifier 7 | Bundle-ClassPath: . 8 | Bundle-Vendor: %providerName 9 | Bundle-Localization: plugin 10 | Bundle-RequiredExecutionEnvironment: JavaSE-19 11 | Export-Package: roboML, 12 | roboML.impl, 13 | roboML.util 14 | Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport, 15 | org.eclipse.core.runtime 16 | Bundle-ActivationPolicy: lazy 17 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/examples/eeprom_clear/eeprom_clear.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Clear 3 | * 4 | * Sets all of the bytes of the EEPROM to 0. 5 | * This example code is in the public domain. 6 | 7 | */ 8 | 9 | #include 10 | 11 | void setup() 12 | { 13 | // write a 0 to all 512 bytes of the EEPROM 14 | for (int i = 0; i < 512; i++) 15 | EEPROM.write(i, 0); 16 | 17 | // turn the LED on when we're done 18 | digitalWrite(13, HIGH); 19 | } 20 | 21 | void loop() 22 | { 23 | } 24 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /langium/Robot_ML/files/triangle.rml: -------------------------------------------------------------------------------- 1 | let void triangle() { 2 | var RMLInt sideLength = 100 3 | var RMLInt rotationAngle = 120 4 | var RMLInt count = 0 5 | 6 | loop count < 3 { 7 | Clock rotationAngle 8 | 9 | Forward sideLength cm 10 | Forward sideLength cm 11 | Forward sideLength cm 12 | 13 | count = count + 1 14 | } 15 | } 16 | 17 | let void main() { 18 | setSpeed(150 dm) 19 | Clock 60 20 | var RMLInt count = 0 21 | 22 | loop count < 1 { 23 | count = count + 1 24 | triangle() 25 | } 26 | } -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/langium/Terminals.langium: -------------------------------------------------------------------------------- 1 | 2 | terminal ID returns string:'^'? ('a' ..'z' | 'A' ..'Z' | '_' )('a' ..'z' | 'A' ..'Z' | '_' | '0' ..'9' )* ; 3 | terminal INT returns number:'0' ..'9' +; 4 | terminal STRING returns string:'"' ('\\' . | !('\\' | '"' ))*'"' | "'" ('\\' . | !('\\' | "'" ))*"'" ; 5 | hidden terminal ML_COMMENT returns string:'/*' -> '*/' ; 6 | hidden terminal SL_COMMENT returns string:'//' !('\n' | '\r' )('\r'? '\n' )? ; 7 | hidden terminal WS returns string:(' ' | '\t' | '\r' | '\n' )+; 8 | terminal ANY_OTHER returns string:.; 9 | -------------------------------------------------------------------------------- /langium/Robot_ML/files/square.rml: -------------------------------------------------------------------------------- 1 | let void square() { 2 | var RMLInt sideLength = 60 3 | var RMLInt rotationAngle = 90 4 | var RMLInt count = 0 5 | 6 | loop count < 4 { 7 | Clock rotationAngle 8 | 9 | Backward sideLength cm 10 | Backward sideLength cm 11 | Backward sideLength cm 12 | Backward sideLength cm 13 | 14 | count = count + 1 15 | } 16 | } 17 | 18 | let void main() { 19 | setSpeed(250 dm) 20 | var RMLInt count = 0 21 | 22 | loop count < 1 { 23 | count = count + 1 24 | square() 25 | } 26 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Ultrasound 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | EEPROM KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | ####################################### 16 | # Constants (LITERAL1) 17 | ####################################### 18 | 19 | -------------------------------------------------------------------------------- /langium/Robot_ML/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "Node16", 5 | "lib": ["ESNext", "DOM", "WebWorker"], 6 | "sourceMap": true, 7 | "outDir": "out", 8 | "strict": true, 9 | "noUnusedLocals": true, 10 | "noImplicitReturns": true, 11 | "noImplicitOverride": true, 12 | "moduleResolution": "Node16", 13 | "esModuleInterop": true, 14 | "skipLibCheck": true, 15 | "forceConsistentCasingInFileNames": true 16 | }, 17 | "include": [ 18 | "src/**/*.ts" 19 | ], 20 | "exclude": [ 21 | "out", 22 | "node_modules" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /langium/Robot_ML/files/spiral.rml: -------------------------------------------------------------------------------- 1 | let void spiral() { 2 | var RMLInt sideLength = 10 3 | var RMLInt rotationAngle = 20 4 | var RMLInt count = 0 5 | 6 | loop count < 100 { 7 | AntiClock rotationAngle 8 | 9 | SideLeft sideLength mm 10 | SideLeft sideLength mm 11 | SideLeft sideLength mm 12 | SideLeft sideLength mm 13 | 14 | count = count + 1 15 | sideLength = sideLength + 2 16 | } 17 | } 18 | 19 | let void main() { 20 | setSpeed(250 dm) 21 | var RMLInt count = 0 22 | 23 | loop count < 1 { 24 | count = count + 1 25 | spiral() 26 | } 27 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/main.ts: -------------------------------------------------------------------------------- 1 | import { startLanguageServer } from 'langium'; 2 | import { NodeFileSystem } from 'langium/node'; 3 | import { createConnection, ProposedFeatures } from 'vscode-languageserver/node.js'; 4 | import { createRoboMlServices } from './robo-ml-module.js'; 5 | 6 | // Create a connection to the client 7 | const connection = createConnection(ProposedFeatures.all); 8 | 9 | // Inject the shared services and language-specific services 10 | const { shared } = createRoboMlServices({ connection, ...NodeFileSystem }); 11 | 12 | // Start the language server with the shared services 13 | startLanguageServer(shared); 14 | -------------------------------------------------------------------------------- /langium/Robot_ML/tsconfig.monarch.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "module": "ESNext", 5 | "sourceMap": true, 6 | "outDir": "out/syntaxes", 7 | "strict": true, 8 | "noUnusedLocals": true, 9 | "noImplicitReturns": true, 10 | "noImplicitOverride": true, 11 | "moduleResolution": "node", 12 | "esModuleInterop": true, 13 | "skipLibCheck": true, 14 | "forceConsistentCasingInFileNames": true 15 | }, 16 | "include": [ 17 | "syntaxes/robo-ml.monarch.ts" 18 | ], 19 | "exclude": ["out", "node_modules"] 20 | } 21 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 4 | org.eclipse.jdt.core.compiler.compliance=17 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 9 | org.eclipse.jdt.core.compiler.release=enabled 10 | org.eclipse.jdt.core.compiler.source=17 11 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslAntlrTokenFileProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.parser.antlr; 5 | 6 | import java.io.InputStream; 7 | import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; 8 | 9 | public class MyDslAntlrTokenFileProvider implements IAntlrTokenFileProvider { 10 | 11 | @Override 12 | public InputStream getAntlrTokenFile() { 13 | ClassLoader classLoader = getClass().getClassLoader(); 14 | return classLoader.getResourceAsStream("org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/simulator/block.js: -------------------------------------------------------------------------------- 1 | class Block { 2 | constructor(_x, _y, _width, _height) { 3 | this.x = _x; 4 | this.y = _y; 5 | this.width = _width; 6 | this.height = _height; 7 | } 8 | 9 | show() { 10 | line(this.x , this.y , this.x + this.width , this.y); 11 | line(this.x , this.y , this.x , this.y + this.height); 12 | line(this.x + this.width , this.y , this.x + this.width , this.y + this.height); 13 | line(this.x , this.y + this.height , this.x + this.width , this.y + this.height); 14 | } 15 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/simulator/block.js: -------------------------------------------------------------------------------- 1 | class Block { 2 | constructor(_x, _y, _width, _height) { 3 | this.x = _x; 4 | this.y = _y; 5 | this.width = _width; 6 | this.height = _height; 7 | } 8 | 9 | show() { 10 | line(this.x , this.y , this.x + this.width , this.y); 11 | line(this.x , this.y , this.x , this.y + this.height); 12 | line(this.x + this.width , this.y , this.x + this.width , this.y + this.height); 13 | line(this.x , this.y + this.height , this.x + this.width , this.y + this.height); 14 | } 15 | } -------------------------------------------------------------------------------- /langium/Robot_ML/files/test.rml: -------------------------------------------------------------------------------- 1 | let void main() { 2 | setSpeed(150 dm) 3 | var RMLInt count = 0 4 | var RMLInt test = count 5 | loop count < 5 6 | { 7 | count = count + 1 8 | square() 9 | } 10 | } 11 | 12 | let void square(){ 13 | Forward 30 cm 14 | Clock 90 15 | Forward 300 mm 16 | Clock 90 17 | Forward 30 cm 18 | Clock 90 19 | Forward 300 mm 20 | Clock 90 21 | } 22 | 23 | let RMLInt variables(RMLInt test){ 24 | variables(4) 25 | var RMLBoolean test = true < true + true 26 | if ( test ) { 27 | setRotation(90) 28 | } else { 29 | if ( test == false ) { 30 | setRotation(-90) 31 | } 32 | } 33 | return 1 34 | } -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/validation/AbstractMyDslValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.validation; 5 | 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | import org.eclipse.emf.ecore.EPackage; 9 | import org.eclipse.xtext.validation.AbstractDeclarativeValidator; 10 | 11 | public abstract class AbstractMyDslValidator extends AbstractDeclarativeValidator { 12 | 13 | @Override 14 | protected List getEPackages() { 15 | List result = new ArrayList(); 16 | result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.example.org/roboML")); 17 | return result; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /langium/Robot_ML/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "Build robo-ml", 8 | "command": "npm run langium:generate && npm run build", 9 | "type": "shell", 10 | "group": { 11 | "kind": "build", 12 | "isDefault": true 13 | }, 14 | "detail": "Langium: Generate grammar and build the robo-ml language", 15 | "icon": { 16 | "color": "terminal.ansiGreen", 17 | "id": "server-process" 18 | } 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | bin.excludes = **/*.mwe2,\ 7 | **/*.xtend 8 | additional.bundles = org.eclipse.xtext.xbase,\ 9 | org.eclipse.xtext.common.types,\ 10 | org.eclipse.xtext.xtext.generator,\ 11 | org.eclipse.emf.codegen.ecore,\ 12 | org.eclipse.emf.mwe.utils,\ 13 | org.eclipse.emf.mwe2.launch,\ 14 | org.eclipse.emf.mwe2.lib,\ 15 | org.objectweb.asm,\ 16 | org.apache.commons.logging,\ 17 | org.apache.log4j 18 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/validation/MyDslValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.validation; 5 | 6 | 7 | /** 8 | * This class contains custom validation rules. 9 | * 10 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation 11 | */ 12 | public class MyDslValidator extends AbstractMyDslValidator { 13 | 14 | // public static final String INVALID_NAME = "invalidName"; 15 | // 16 | // @Check 17 | // public void checkGreetingStartsWithCapital(Greeting greeting) { 18 | // if (!Character.isUpperCase(greeting.getName().charAt(0))) { 19 | // warning("Name should start with a capital", 20 | // MyDslPackage.Literals.GREETING__NAME, 21 | // INVALID_NAME); 22 | // } 23 | // } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/GetValueImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | 7 | import roboML.GetValue; 8 | import roboML.RoboMLPackage; 9 | 10 | /** 11 | * 12 | * An implementation of the model object 'Get Value'. 13 | * 14 | * 15 | * @generated 16 | */ 17 | public class GetValueImpl extends EntityImpl implements GetValue { 18 | /** 19 | * 20 | * 21 | * @generated 22 | */ 23 | protected GetValueImpl() { 24 | super(); 25 | } 26 | 27 | /** 28 | * 29 | * 30 | * @generated 31 | */ 32 | @Override 33 | protected EClass eStaticClass() { 34 | return RoboMLPackage.Literals.GET_VALUE; 35 | } 36 | 37 | } //GetValueImpl 38 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/generator/MyDslGenerator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.generator; 5 | 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.xtext.generator.AbstractGenerator; 8 | import org.eclipse.xtext.generator.IFileSystemAccess2; 9 | import org.eclipse.xtext.generator.IGeneratorContext; 10 | 11 | /** 12 | * Generates code from your model files on save. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 15 | */ 16 | @SuppressWarnings("all") 17 | public class MyDslGenerator extends AbstractGenerator { 18 | @Override 19 | public void doGenerate(final Resource resource, final IFileSystemAccess2 fsa, final IGeneratorContext context) { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/TimeSensorImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | 7 | import roboML.RoboMLPackage; 8 | import roboML.TimeSensor; 9 | 10 | /** 11 | * 12 | * An implementation of the model object 'Time Sensor'. 13 | * 14 | * 15 | * @generated 16 | */ 17 | public class TimeSensorImpl extends SensorImpl implements TimeSensor { 18 | /** 19 | * 20 | * 21 | * @generated 22 | */ 23 | protected TimeSensorImpl() { 24 | super(); 25 | } 26 | 27 | /** 28 | * 29 | * 30 | * @generated 31 | */ 32 | @Override 33 | protected EClass eStaticClass() { 34 | return RoboMLPackage.Literals.TIME_SENSOR; 35 | } 36 | 37 | } //TimeSensorImpl 38 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/VariableRefImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | import roboML.RoboMLPackage; 7 | import roboML.VariableRef; 8 | 9 | /** 10 | * 11 | * An implementation of the model object 'Variable Ref'. 12 | * 13 | * 14 | * @generated 15 | */ 16 | public class VariableRefImpl extends EntityImpl implements VariableRef { 17 | /** 18 | * 19 | * 20 | * @generated 21 | */ 22 | protected VariableRefImpl() { 23 | super(); 24 | } 25 | 26 | /** 27 | * 28 | * 29 | * @generated 30 | */ 31 | @Override 32 | protected EClass eStaticClass() { 33 | return RoboMLPackage.Literals.VARIABLE_REF; 34 | } 35 | 36 | } //VariableRefImpl 37 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/Examples/PIDSample/PIDSample.pde: -------------------------------------------------------------------------------- 1 | /******************************************************** 2 | * PID Simple Example 3 | * Reading analog input 0 to control analog PWM output 3 4 | ********************************************************/ 5 | 6 | #include 7 | 8 | //Define Variables we'll be connecting to 9 | double Setpoint, Input, Output; 10 | 11 | //Specify the links and initial tuning parameters 12 | PID myPID(&Input, &Output, &Setpoint,2,5,1); 13 | 14 | void setup() 15 | { 16 | //initialize the variables we're linked to 17 | Input = analogRead(0); 18 | Setpoint = 100; 19 | 20 | //turn the PID on 21 | myPID.SetMode(AUTO); 22 | } 23 | 24 | void loop() 25 | { 26 | Input = analogRead(0); 27 | myPID.Compute(); 28 | analogWrite(3,Output); 29 | } 30 | 31 | 32 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/examples/master_writer/master_writer.pde: -------------------------------------------------------------------------------- 1 | // Wire Master Writer 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Writes data to an I2C/TWI slave device 6 | // Refer to the "Wire Slave Receiver" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(); // join i2c bus (address optional for master) 18 | } 19 | 20 | byte x = 0; 21 | 22 | void loop() 23 | { 24 | Wire.beginTransmission(4); // transmit to device #4 25 | Wire.send("x is "); // sends five bytes 26 | Wire.send(x); // sends one byte 27 | Wire.endTransmission(); // stop transmitting 28 | 29 | x++; 30 | delay(500); 31 | } 32 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/DistanceSensorImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | 7 | import roboML.DistanceSensor; 8 | import roboML.RoboMLPackage; 9 | 10 | /** 11 | * 12 | * An implementation of the model object 'Distance Sensor'. 13 | * 14 | * 15 | * @generated 16 | */ 17 | public class DistanceSensorImpl extends SensorImpl implements DistanceSensor { 18 | /** 19 | * 20 | * 21 | * @generated 22 | */ 23 | protected DistanceSensorImpl() { 24 | super(); 25 | } 26 | 27 | /** 28 | * 29 | * 30 | * @generated 31 | */ 32 | @Override 33 | protected EClass eStaticClass() { 34 | return RoboMLPackage.Literals.DISTANCE_SENSOR; 35 | } 36 | 37 | } //DistanceSensorImpl 38 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For Wire 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | ####################################### 10 | # Methods and Functions (KEYWORD2) 11 | ####################################### 12 | 13 | begin KEYWORD2 14 | beginTransmission KEYWORD2 15 | endTransmission KEYWORD2 16 | requestFrom KEYWORD2 17 | send KEYWORD2 18 | receive KEYWORD2 19 | onReceive KEYWORD2 20 | onRequest KEYWORD2 21 | 22 | ####################################### 23 | # Instances (KEYWORD2) 24 | ####################################### 25 | 26 | Wire KEYWORD2 27 | 28 | ####################################### 29 | # Constants (LITERAL1) 30 | ####################################### 31 | 32 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/StatementImpl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | 7 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; 8 | 9 | import roboML.RoboMLPackage; 10 | import roboML.Statement; 11 | 12 | /** 13 | * 14 | * An implementation of the model object 'Statement'. 15 | * 16 | * 17 | * @generated 18 | */ 19 | public abstract class StatementImpl extends MinimalEObjectImpl.Container implements Statement { 20 | /** 21 | * 22 | * 23 | * @generated 24 | */ 25 | protected StatementImpl() { 26 | super(); 27 | } 28 | 29 | /** 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | protected EClass eStaticClass() { 36 | return RoboMLPackage.Literals.STATEMENT; 37 | } 38 | 39 | } //StatementImpl 40 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/generator/MyDslGenerator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.generator 5 | 6 | import org.eclipse.emf.ecore.resource.Resource 7 | import org.eclipse.xtext.generator.AbstractGenerator 8 | import org.eclipse.xtext.generator.IFileSystemAccess2 9 | import org.eclipse.xtext.generator.IGeneratorContext 10 | 11 | /** 12 | * Generates code from your model files on save. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 15 | */ 16 | class MyDslGenerator extends AbstractGenerator { 17 | 18 | override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { 19 | // fsa.generateFile('greetings.txt', 'People to greet: ' + 20 | // resource.allContents 21 | // .filter(Greeting) 22 | // .map[name] 23 | // .join(', ')) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/generator/MyDslGenerator.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.generator 5 | 6 | import org.eclipse.emf.ecore.resource.Resource 7 | import org.eclipse.xtext.generator.AbstractGenerator 8 | import org.eclipse.xtext.generator.IFileSystemAccess2 9 | import org.eclipse.xtext.generator.IGeneratorContext 10 | 11 | /** 12 | * Generates code from your model files on save. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 15 | */ 16 | class MyDslGenerator extends AbstractGenerator { 17 | 18 | override void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { 19 | // fsa.generateFile('greetings.txt', 'People to greet: ' + 20 | // resource.allContents 21 | // .filter(Greeting) 22 | // .map[name] 23 | // .join(', ')) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src-gen/roboML/impl/NewEClass12Impl.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML.impl; 4 | 5 | import org.eclipse.emf.ecore.EClass; 6 | 7 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; 8 | 9 | import roboML.NewEClass12; 10 | import roboML.RoboMLPackage; 11 | 12 | /** 13 | * 14 | * An implementation of the model object 'New EClass12'. 15 | * 16 | * 17 | * @generated 18 | */ 19 | public class NewEClass12Impl extends MinimalEObjectImpl.Container implements NewEClass12 { 20 | /** 21 | * 22 | * 23 | * @generated 24 | */ 25 | protected NewEClass12Impl() { 26 | super(); 27 | } 28 | 29 | /** 30 | * 31 | * 32 | * @generated 33 | */ 34 | @Override 35 | protected EClass eStaticClass() { 36 | return RoboMLPackage.Literals.NEW_ECLASS12; 37 | } 38 | 39 | } //NewEClass12Impl 40 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/examples/slave_sender/slave_sender.pde: -------------------------------------------------------------------------------- 1 | // Wire Slave Sender 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Sends data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Reader" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(2); // join i2c bus with address #2 18 | Wire.onRequest(requestEvent); // register event 19 | } 20 | 21 | void loop() 22 | { 23 | delay(100); 24 | } 25 | 26 | // function that executes whenever data is requested by master 27 | // this function is registered as an event, see setup() 28 | void requestEvent() 29 | { 30 | Wire.send("hello "); // respond with message of 6 bytes 31 | // as expected by master 32 | } 33 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/validation/MyDslConfigurableIssueCodesProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.validation; 5 | 6 | import org.eclipse.xtext.preferences.PreferenceKey; 7 | import org.eclipse.xtext.util.IAcceptor; 8 | import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider; 9 | import org.eclipse.xtext.validation.SeverityConverter; 10 | 11 | public class MyDslConfigurableIssueCodesProvider extends ConfigurableIssueCodesProvider { 12 | protected static final String ISSUE_CODE_PREFIX = "org.xtext.example.mydsl."; 13 | 14 | public static final String DEPRECATED_MODEL_PART = ISSUE_CODE_PREFIX + "deprecatedModelPart"; 15 | 16 | @Override 17 | protected void initialize(IAcceptor acceptor) { 18 | super.initialize(acceptor); 19 | acceptor.accept(create(DEPRECATED_MODEL_PART, SeverityConverter.SEVERITY_WARNING)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/examples/master_reader/master_reader.pde: -------------------------------------------------------------------------------- 1 | // Wire Master Reader 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Reads data from an I2C/TWI slave device 6 | // Refer to the "Wire Slave Sender" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(); // join i2c bus (address optional for master) 18 | Serial.begin(9600); // start serial for output 19 | } 20 | 21 | void loop() 22 | { 23 | Wire.requestFrom(2, 6); // request 6 bytes from slave device #2 24 | 25 | while(Wire.available()) // slave may send less than requested 26 | { 27 | char c = Wire.receive(); // receive a byte as character 28 | Serial.print(c); // print the character 29 | } 30 | 31 | delay(500); 32 | } 33 | -------------------------------------------------------------------------------- /langium/Robot_ML/language-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | // symbol used for single line comment. Remove this entry if your language does not support line comments 4 | "lineComment": "//", 5 | // symbols used for start and end a block comment. Remove this entry if your language does not support block comments 6 | "blockComment": [ "/*", "*/" ] 7 | }, 8 | // symbols used as brackets 9 | "brackets": [ 10 | ["{", "}"], 11 | ["[", "]"], 12 | ["(", ")"] 13 | ], 14 | // symbols that are auto closed when typing 15 | "autoClosingPairs": [ 16 | ["{", "}"], 17 | ["[", "]"], 18 | ["(", ")"], 19 | ["\"", "\""], 20 | ["'", "'"] 21 | ], 22 | // symbols that can be used to surround a selection 23 | "surroundingPairs": [ 24 | ["{", "}"], 25 | ["[", "]"], 26 | ["(", ")"], 27 | ["\"", "\""], 28 | ["'", "'"] 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/signals.js: -------------------------------------------------------------------------------- 1 | let currentListener; 2 | 3 | /** 4 | * Creates a signal with an initial value. 5 | * 6 | * @param {*} initialValue - The initial value of the signal. 7 | * @returns {Array} - An array containing the read and write functions of the signal. 8 | */ 9 | export function createSignal(initialValue) { 10 | let value = initialValue; 11 | 12 | const subscribers = new Set(); 13 | 14 | const read = () => { 15 | if (currentListener !== undefined) { 16 | subscribers.add(currentListener); 17 | } 18 | return value; 19 | }; 20 | const write = (newValue) => { 21 | value = newValue; 22 | subscribers.forEach((fn) => fn()); 23 | }; 24 | 25 | return [read, write]; 26 | } 27 | 28 | /** 29 | * Creates an effect with the given callback function. 30 | * @param {Function} callback - The callback function to be executed as the effect. 31 | */ 32 | export function createEffect(callback) { 33 | currentListener = callback; 34 | callback(); 35 | currentListener = undefined; 36 | } 37 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/keywords.txt: -------------------------------------------------------------------------------- 1 | ####################################### 2 | # Syntax Coloring Map For LiquidCrystal 3 | ####################################### 4 | 5 | ####################################### 6 | # Datatypes (KEYWORD1) 7 | ####################################### 8 | 9 | PID KEYWORD1 10 | 11 | ####################################### 12 | # Methods and Functions (KEYWORD2) 13 | ####################################### 14 | 15 | SetMode KEYWORD2 16 | Compute KEYWORD2 17 | SetInputLimits KEYWORD2 18 | SetOutputLimits KEYWORD2 19 | SetTunings KEYWORD2 20 | SetSampleTime KEYWORD2 21 | JustCalculated KEYWORD2 22 | Reset KEYWORD2 23 | GetMode KEYWORD2 24 | GetINMin KEYWORD2 25 | GetINMax KEYWORD2 26 | GetOUTMin KEYWORD2 27 | GetOUTMax KEYWORD2 28 | GetSampleTime KEYWORD2 29 | GetP_Param KEYWORD2 30 | GetI_Param KEYWORD2 31 | GetD_Param KEYWORD2 32 | 33 | ####################################### 34 | # Constants (LITERAL1) 35 | ####################################### 36 | 37 | AUTO LITERAL1 38 | MANUAL LITERAL1 39 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PinChangeInt/PinChangeIntConfig.h: -------------------------------------------------------------------------------- 1 | 2 | // This file is used to separate the changes you make to personalize the 3 | // Pin Change Interrupt library from any future changes to the library itself. 4 | // Ideally it would reside in the folder of the current sketch, but I have not 5 | // figured out how such a file can be included from a library. 6 | // Nothing is required to be defined within this file since default values are 7 | // defined in the primary PinChangeInt.h file. 8 | 9 | // Uncomment the line below to limit the handler to servicing a single interrupt per invocation. 10 | //#define DISABLE_PCINT_MULTI_SERVICE 11 | 12 | // Define the value MAX_PIN_CHANGE_PINS to limit the number of pins that may be 13 | // used for pin change interrupts. This value determines the number of pin change 14 | // interrupts supported for all ports. 15 | //#define MAX_PIN_CHANGE_PINS 2 16 | 17 | // declare ports without pin change interrupts used 18 | //#define NO_PORTB_PINCHANGES 19 | //#define NO_PORTC_PINCHANGES 20 | //#define NO_PORTD_PINCHANGES 21 | -------------------------------------------------------------------------------- /src-gen/roboML/RoboMLProgram.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | import org.eclipse.emf.ecore.EObject; 8 | 9 | /** 10 | * 11 | * A representation of the model object 'Program'. 12 | * 13 | * 14 | *

15 | * The following features are supported: 16 | *

17 | *
    18 | *
  • {@link roboML.RoboMLProgram#getFunction Function}
  • 19 | *
20 | * 21 | * @see roboML.RoboMLPackage#getRoboMLProgram() 22 | * @model 23 | * @generated 24 | */ 25 | public interface RoboMLProgram extends EObject { 26 | /** 27 | * Returns the value of the 'Function' containment reference list. 28 | * The list contents are of type {@link roboML.Function}. 29 | * 30 | * 31 | * @return the value of the 'Function' containment reference list. 32 | * @see roboML.RoboMLPackage#getRoboMLProgram_Function() 33 | * @model containment="true" 34 | * @generated 35 | */ 36 | EList getFunction(); 37 | 38 | } // RoboMLProgram 39 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/generated/module.ts: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * This file was generated by langium-cli 2.0.0. 3 | * DO NOT EDIT MANUALLY! 4 | ******************************************************************************/ 5 | 6 | import type { LangiumGeneratedServices, LangiumGeneratedSharedServices, LangiumSharedServices, LangiumServices, LanguageMetaData, Module } from 'langium'; 7 | import { RoboMlAstReflection } from './ast.js'; 8 | import { RoboMlGrammar } from './grammar.js'; 9 | 10 | export const RoboMlLanguageMetaData = { 11 | languageId: 'robo-ml', 12 | fileExtensions: ['.rml'], 13 | caseInsensitive: false 14 | } as const satisfies LanguageMetaData; 15 | 16 | export const RoboMlGeneratedSharedModule: Module = { 17 | AstReflection: () => new RoboMlAstReflection() 18 | }; 19 | 20 | export const RoboMlGeneratedModule: Module = { 21 | Grammar: () => RoboMlGrammar(), 22 | LanguageMetaData: () => RoboMlLanguageMetaData, 23 | parser: {} 24 | }; 25 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/examples/eeprom_write/eeprom_write.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Write 3 | * 4 | * Stores values read from analog input 0 into the EEPROM. 5 | * These values will stay in the EEPROM when the board is 6 | * turned off and may be retrieved later by another sketch. 7 | */ 8 | 9 | #include 10 | 11 | // the current address in the EEPROM (i.e. which byte 12 | // we're going to write to next) 13 | int addr = 0; 14 | 15 | void setup() 16 | { 17 | } 18 | 19 | void loop() 20 | { 21 | // need to divide by 4 because analog inputs range from 22 | // 0 to 1023 and each byte of the EEPROM can only hold a 23 | // value from 0 to 255. 24 | int val = analogRead(0) / 4; 25 | 26 | // write the value to the appropriate byte of the EEPROM. 27 | // these values will remain there when the board is 28 | // turned off. 29 | EEPROM.write(addr, val); 30 | 31 | // advance to the next address. there are 512 bytes in 32 | // the EEPROM, so go back to 0 when we hit 512. 33 | addr = addr + 1; 34 | if (addr == 512) 35 | addr = 0; 36 | 37 | delay(100); 38 | } 39 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/web/simulator/scene.ts: -------------------------------------------------------------------------------- 1 | import * as Entities from "./entities.js" 2 | import { Vector } from "./utils.js" 3 | 4 | export interface Scene{ 5 | size:Vector; 6 | entities:Entities.Entities[]; 7 | robot: Entities.Robot; 8 | time:number; 9 | timestamps:Array; 10 | } 11 | 12 | export class BaseScene{ 13 | size:Vector; 14 | entities:Entities.Entities[] = []; 15 | robot: Entities.Robot; 16 | time:number = 0; 17 | timestamps:Array = []; 18 | 19 | constructor(size:Vector = new Vector(10000,10000)){ 20 | this.size = size; 21 | this.robot = new Entities.Robot(this.size.scale(0.5), new Vector(250,250), 0, 30, this) 22 | this.entities.push(new Entities.Wall(Vector.null(), this.size.projX())); 23 | this.entities.push(new Entities.Wall(Vector.null(), this.size.projY())); 24 | this.entities.push(new Entities.Wall(this.size, this.size.projY())); 25 | this.entities.push(new Entities.Wall(this.size, this.size.projX())); 26 | this.timestamps.push(new Entities.Timestamp(0, this.robot)); 27 | } 28 | } 29 | 30 | // You can add new Scenes here -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/examples/eeprom_read/eeprom_read.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * EEPROM Read 3 | * 4 | * Reads the value of each byte of the EEPROM and prints it 5 | * to the computer. 6 | * This example code is in the public domain. 7 | */ 8 | 9 | #include 10 | 11 | // start reading from the first byte (address 0) of the EEPROM 12 | int address = 0; 13 | byte value; 14 | 15 | void setup() 16 | { 17 | // initialize serial and wait for port to open: 18 | Serial.begin(9600); 19 | while (!Serial) { 20 | ; // wait for serial port to connect. Needed for Leonardo only 21 | } 22 | } 23 | 24 | void loop() 25 | { 26 | // read a byte from the current address of the EEPROM 27 | value = EEPROM.read(address); 28 | 29 | Serial.print(address); 30 | Serial.print("\t"); 31 | Serial.print(value, DEC); 32 | Serial.println(); 33 | 34 | // advance to the next address of the EEPROM 35 | address = address + 1; 36 | 37 | // there are only 512 bytes of EEPROM, from 0 to 511, so if we're 38 | // on address 512, wrap around to address 0 39 | if (address == 512) 40 | address = 0; 41 | 42 | delay(500); 43 | } 44 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/web/simulator/scene.ts: -------------------------------------------------------------------------------- 1 | import * as Entities from "./entities.js" 2 | import { Vector } from "./utils.js" 3 | 4 | export interface Scene{ 5 | size:Vector; 6 | entities:Entities.Entities[]; 7 | robot: Entities.Robot; 8 | time:number; 9 | timestamps:Array; 10 | } 11 | 12 | export class BaseScene{ 13 | size:Vector; 14 | entities:Entities.Entities[] = []; 15 | robot: Entities.Robot; 16 | time:number = 0; 17 | timestamps:Array = []; 18 | 19 | constructor(size:Vector = new Vector(10000,10000)){ 20 | this.size = size; 21 | this.robot = new Entities.Robot(this.size.scale(0.5), new Vector(250,250), 0, 30, this) 22 | this.entities.push(new Entities.Wall(Vector.null(), this.size.projX())); 23 | this.entities.push(new Entities.Wall(Vector.null(), this.size.projY())); 24 | this.entities.push(new Entities.Wall(this.size, this.size.projY())); 25 | this.entities.push(new Entities.Wall(this.size, this.size.projX())); 26 | this.timestamps.push(new Entities.Timestamp(0, this.robot)); 27 | } 28 | } 29 | 30 | // You can add new Scenes here -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/EEPROM.h: -------------------------------------------------------------------------------- 1 | /* 2 | EEPROM.h - EEPROM library 3 | Copyright (c) 2006 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef EEPROM_h 21 | #define EEPROM_h 22 | 23 | #include 24 | 25 | class EEPROMClass 26 | { 27 | public: 28 | uint8_t read(int); 29 | void write(int, uint8_t); 30 | }; 31 | 32 | extern EEPROMClass EEPROM; 33 | 34 | #endif 35 | 36 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Automatic-Module-Name: org.xtext.example.mydsl 3 | Bundle-ManifestVersion: 2 4 | Bundle-Name: org.xtext.example.mydsl 5 | Bundle-Vendor: My Company 6 | Bundle-Version: 1.0.0.qualifier 7 | Bundle-SymbolicName: org.xtext.example.mydsl; singleton:=true 8 | Bundle-ActivationPolicy: lazy 9 | Require-Bundle: RoboML, 10 | org.eclipse.xtext, 11 | org.eclipse.xtext.xbase, 12 | org.eclipse.equinox.common;bundle-version="3.16.0", 13 | io.typefox.xtext2langium;bundle-version="0.4.0", 14 | io.typefox.xtext2langium.source;bundle-version="0.4.0", 15 | org.eclipse.xtext.xbase.lib;bundle-version="2.14.0", 16 | org.eclipse.xtext.util, 17 | org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" 18 | Bundle-RequiredExecutionEnvironment: JavaSE-17 19 | Export-Package: org.xtext.example.mydsl.parser.antlr.internal, 20 | org.xtext.example.mydsl.scoping, 21 | org.xtext.example.mydsl.services, 22 | org.xtext.example.mydsl.generator, 23 | org.xtext.example.mydsl.validation, 24 | org.xtext.example.mydsl, 25 | org.xtext.example.mydsl.formatting2, 26 | org.xtext.example.mydsl.serializer, 27 | org.xtext.example.mydsl.parser.antlr 28 | Import-Package: org.apache.log4j 29 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/examples/digital_potentiometer/digital_potentiometer.pde: -------------------------------------------------------------------------------- 1 | // I2C Digital Potentiometer 2 | // by Nicholas Zambetti 3 | // and Shawn Bonkowski 4 | 5 | // Demonstrates use of the Wire library 6 | // Controls AD5171 digital potentiometer via I2C/TWI 7 | 8 | // Created 31 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | // This example code is in the public domain. 13 | 14 | 15 | #include 16 | 17 | void setup() 18 | { 19 | Wire.begin(); // join i2c bus (address optional for master) 20 | } 21 | 22 | byte val = 0; 23 | 24 | void loop() 25 | { 26 | Wire.beginTransmission(44); // transmit to device #44 (0x2c) 27 | // device address is specified in datasheet 28 | Wire.send(0x00); // sends instruction byte 29 | Wire.send(val); // sends potentiometer value byte 30 | Wire.endTransmission(); // stop transmitting 31 | 32 | val++; // increment value 33 | if(val == 64) // if reached 64th position (max) 34 | { 35 | val = 0; // start over from lowest value 36 | } 37 | delay(500); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/examples/slave_receiver/slave_receiver.pde: -------------------------------------------------------------------------------- 1 | // Wire Slave Receiver 2 | // by Nicholas Zambetti 3 | 4 | // Demonstrates use of the Wire library 5 | // Receives data as an I2C/TWI slave device 6 | // Refer to the "Wire Master Writer" example for use with this 7 | 8 | // Created 29 March 2006 9 | 10 | // This example code is in the public domain. 11 | 12 | 13 | #include 14 | 15 | void setup() 16 | { 17 | Wire.begin(4); // join i2c bus with address #4 18 | Wire.onReceive(receiveEvent); // register event 19 | Serial.begin(9600); // start serial for output 20 | } 21 | 22 | void loop() 23 | { 24 | delay(100); 25 | } 26 | 27 | // function that executes whenever data is received from master 28 | // this function is registered as an event, see setup() 29 | void receiveEvent(int howMany) 30 | { 31 | while(1 < Wire.available()) // loop through all but the last 32 | { 33 | char c = Wire.receive(); // receive byte as a character 34 | Serial.print(c); // print the character 35 | } 36 | int x = Wire.receive(); // receive byte as an integer 37 | Serial.println(x); // print the integer 38 | } 39 | -------------------------------------------------------------------------------- /langium/Robot_ML/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Run Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ], 15 | "sourceMaps": true, 16 | "outFiles": [ 17 | "${workspaceFolder}/out/**/*.js" 18 | ] 19 | }, 20 | { 21 | "name": "Attach to Language Server", 22 | "type": "node", 23 | "port": 6009, 24 | "request": "attach", 25 | "skipFiles": [ 26 | "/**" 27 | ], 28 | "sourceMaps": true, 29 | "outFiles": [ 30 | "${workspaceFolder}/out/**/*.js", 31 | "${workspaceFolder}/node_modules/langium" 32 | ] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/formatting2/MyDslFormatter.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.formatting2 5 | 6 | import com.google.inject.Inject 7 | import org.eclipse.xtext.formatting2.AbstractFormatter2 8 | import org.eclipse.xtext.formatting2.IFormattableDocument 9 | import org.xtext.example.mydsl.services.MyDslGrammarAccess 10 | import roboML.Function 11 | import roboML.RoboMLProgram 12 | 13 | class MyDslFormatter extends AbstractFormatter2 { 14 | 15 | @Inject extension MyDslGrammarAccess 16 | 17 | def dispatch void format(RoboMLProgram roboMLProgram, extension IFormattableDocument document) { 18 | // TODO: format HiddenRegions around keywords, attributes, cross references, etc. 19 | for (function : roboMLProgram.function) { 20 | function.format 21 | } 22 | } 23 | 24 | def dispatch void format(Function function, extension IFormattableDocument document) { 25 | // TODO: format HiddenRegions around keywords, attributes, cross references, etc. 26 | for (statement : function.instruction) { 27 | statement.format 28 | } 29 | for (variable : function.variable) { 30 | variable.format 31 | } 32 | } 33 | 34 | // TODO: implement for Variable, Loop, Condition, ArithmeticExpression 35 | } 36 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/formatting2/MyDslFormatter.xtend: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.formatting2 5 | 6 | import com.google.inject.Inject 7 | import org.eclipse.xtext.formatting2.AbstractFormatter2 8 | import org.eclipse.xtext.formatting2.IFormattableDocument 9 | import org.xtext.example.mydsl.services.MyDslGrammarAccess 10 | import roboML.Function 11 | import roboML.RoboMLProgram 12 | 13 | class MyDslFormatter extends AbstractFormatter2 { 14 | 15 | @Inject extension MyDslGrammarAccess 16 | 17 | def dispatch void format(RoboMLProgram roboMLProgram, extension IFormattableDocument document) { 18 | // TODO: format HiddenRegions around keywords, attributes, cross references, etc. 19 | for (function : roboMLProgram.function) { 20 | function.format 21 | } 22 | } 23 | 24 | def dispatch void format(Function function, extension IFormattableDocument document) { 25 | // TODO: format HiddenRegions around keywords, attributes, cross references, etc. 26 | for (statement : function.instruction) { 27 | statement.format 28 | } 29 | for (variable : function.variable) { 30 | variable.format 31 | } 32 | } 33 | 34 | // TODO: implement for Variable, Loop, Condition, ArithmeticExpression 35 | } 36 | -------------------------------------------------------------------------------- /src-gen/roboML/FunctionCall.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Function Call'. 8 | * 9 | * 10 | *

11 | * The following features are supported: 12 | *

13 | *
    14 | *
  • {@link roboML.FunctionCall#getFunction Function}
  • 15 | *
16 | * 17 | * @see roboML.RoboMLPackage#getFunctionCall() 18 | * @model 19 | * @generated 20 | */ 21 | public interface FunctionCall extends Entity { 22 | /** 23 | * Returns the value of the 'Function' reference. 24 | * 25 | * 26 | * @return the value of the 'Function' reference. 27 | * @see #setFunction(Function) 28 | * @see roboML.RoboMLPackage#getFunctionCall_Function() 29 | * @model required="true" 30 | * @generated 31 | */ 32 | Function getFunction(); 33 | 34 | /** 35 | * Sets the value of the '{@link roboML.FunctionCall#getFunction Function}' reference. 36 | * 37 | * 38 | * @param value the new value of the 'Function' reference. 39 | * @see #getFunction() 40 | * @generated 41 | */ 42 | void setFunction(Function value); 43 | 44 | } // FunctionCall 45 | -------------------------------------------------------------------------------- /src-gen/roboML/SetValue.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Set Value'. 8 | * 9 | * 10 | *

11 | * The following features are supported: 12 | *

13 | *
    14 | *
  • {@link roboML.SetValue#getEntityToSet Entity To Set}
  • 15 | *
16 | * 17 | * @see roboML.RoboMLPackage#getSetValue() 18 | * @model 19 | * @generated 20 | */ 21 | public interface SetValue extends Statement { 22 | /** 23 | * Returns the value of the 'Entity To Set' reference. 24 | * 25 | * 26 | * @return the value of the 'Entity To Set' reference. 27 | * @see #setEntityToSet(Entity) 28 | * @see roboML.RoboMLPackage#getSetValue_EntityToSet() 29 | * @model required="true" 30 | * @generated 31 | */ 32 | Entity getEntityToSet(); 33 | 34 | /** 35 | * Sets the value of the '{@link roboML.SetValue#getEntityToSet Entity To Set}' reference. 36 | * 37 | * 38 | * @param value the new value of the 'Entity To Set' reference. 39 | * @see #getEntityToSet() 40 | * @generated 41 | */ 42 | void setEntityToSet(Entity value); 43 | 44 | } // SetValue 45 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/MyDslParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.parser.antlr; 5 | 6 | import com.google.inject.Inject; 7 | import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; 8 | import org.eclipse.xtext.parser.antlr.XtextTokenStream; 9 | import org.xtext.example.mydsl.parser.antlr.internal.InternalMyDslParser; 10 | import org.xtext.example.mydsl.services.MyDslGrammarAccess; 11 | 12 | public class MyDslParser extends AbstractAntlrParser { 13 | 14 | @Inject 15 | private MyDslGrammarAccess grammarAccess; 16 | 17 | @Override 18 | protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { 19 | tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); 20 | } 21 | 22 | 23 | @Override 24 | protected InternalMyDslParser createParser(XtextTokenStream stream) { 25 | return new InternalMyDslParser(stream, getGrammarAccess()); 26 | } 27 | 28 | @Override 29 | protected String getDefaultRuleName() { 30 | return "RoboMLProgram"; 31 | } 32 | 33 | public MyDslGrammarAccess getGrammarAccess() { 34 | return this.grammarAccess; 35 | } 36 | 37 | public void setGrammarAccess(MyDslGrammarAccess grammarAccess) { 38 | this.grammarAccess = grammarAccess; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/robo-ml-validator.ts: -------------------------------------------------------------------------------- 1 | import type { ValidationChecks } from 'langium'; 2 | import type { RoboMlAstType } from './generated/ast.js'; 3 | import type { RoboMlServices } from './robo-ml-module.js'; 4 | 5 | /** 6 | * Register custom validation checks. 7 | */ 8 | export function registerValidationChecks(services: RoboMlServices) { 9 | const registry = services.validation.ValidationRegistry; 10 | const validator = services.validation.RoboMlValidator; 11 | const checks: ValidationChecks = { 12 | // Person: validator.checkPersonStartsWithCapital 13 | }; 14 | registry.register(checks, validator); 15 | } 16 | 17 | /** 18 | * Implementation of custom validations. 19 | */ 20 | export class RoboMlValidator { 21 | checks(checks: any, weaver: RoboMlValidator) { 22 | throw new Error('Method not implemented.'); 23 | } 24 | 25 | 26 | // checkPersonStartsWithCapital(person: Person, accept: ValidationAcceptor): void { 27 | // if (person.name) { 28 | // const firstChar = person.name.substring(0, 1); 29 | // if (firstChar.toUpperCase() !== firstChar) { 30 | // accept('warning', 'Person name should start with a capital.', { node: person, property: 'name' }); 31 | // } 32 | // } 33 | // } 34 | 35 | // 36 | 37 | } 38 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | RoboML 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.sirius.nature.modelingproject 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | org.eclipse.xtext.ui.shared.xtextNature 34 | 35 | 36 | 37 | 1697614161846 38 | 39 | 30 40 | 41 | org.eclipse.core.resources.regexFilterMatcher 42 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.xtext.example.mydsl 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.xtext.ui.shared.xtextBuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.pde.ManifestBuilder 20 | 21 | 22 | 23 | 24 | org.eclipse.pde.SchemaBuilder 25 | 26 | 27 | 28 | 29 | 30 | org.eclipse.xtext.ui.shared.xtextNature 31 | org.eclipse.jdt.core.javanature 32 | org.eclipse.pde.PluginNature 33 | 34 | 35 | 36 | 1704643748139 37 | 38 | 30 39 | 40 | org.eclipse.core.resources.regexFilterMatcher 41 | node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src-gen/roboML/Unit.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Unit'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Unit#getType Type}
  • 17 | *
18 | * 19 | * @see roboML.RoboMLPackage#getUnit() 20 | * @model 21 | * @generated 22 | */ 23 | public interface Unit extends EObject { 24 | /** 25 | * Returns the value of the 'Type' attribute. 26 | * The literals are from the enumeration {@link roboML.UnitMeasure}. 27 | * 28 | * 29 | * @return the value of the 'Type' attribute. 30 | * @see roboML.UnitMeasure 31 | * @see #setType(UnitMeasure) 32 | * @see roboML.RoboMLPackage#getUnit_Type() 33 | * @model 34 | * @generated 35 | */ 36 | UnitMeasure getType(); 37 | 38 | /** 39 | * Sets the value of the '{@link roboML.Unit#getType Type}' attribute. 40 | * 41 | * 42 | * @param value the new value of the 'Type' attribute. 43 | * @see roboML.UnitMeasure 44 | * @see #getType() 45 | * @generated 46 | */ 47 | void setType(UnitMeasure value); 48 | 49 | } // Unit 50 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/cli/main.ts: -------------------------------------------------------------------------------- 1 | import { RoboMLProgram } from '../language/visitor.js'; 2 | import chalk from 'chalk'; 3 | import { Command } from 'commander'; 4 | import { RoboMlLanguageMetaData } from '../language/generated/module.js'; 5 | import { createRoboMlServices } from '../language/robo-ml-module.js'; 6 | import { extractAstNode } from './cli-util.js'; 7 | import { NodeFileSystem } from 'langium/node'; 8 | import { Compile } from '../language/semantics/compiler/compiler.js'; 9 | 10 | export type GenerateOptions = { 11 | destination?: string; 12 | } 13 | 14 | export default function(): void { 15 | const program = new Command(); 16 | 17 | const fileExtensions = RoboMlLanguageMetaData.fileExtensions.join(', '); 18 | 19 | program 20 | .command('compile') 21 | .argument('', `source file (possible file extensions: ${fileExtensions})`) 22 | .description('compiles a source file to Arduino code') 23 | .action(async (fileName) => { 24 | console.log(`Compiling ${fileName}`); 25 | const services = createRoboMlServices(NodeFileSystem).RoboMl; 26 | const model = await extractAstNode(fileName, services); 27 | Compile.compileArduino(model); 28 | console.log(chalk.green(`Arduino code compiled successfully: ${fileName}`)); 29 | }); 30 | 31 | program.parse(process.argv); 32 | } 33 | -------------------------------------------------------------------------------- /src-gen/roboML/Entity.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Entity'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Entity#getEntityType Entity Type}
  • 17 | *
18 | * 19 | * @see roboML.RoboMLPackage#getEntity() 20 | * @model 21 | * @generated 22 | */ 23 | public interface Entity extends EObject { 24 | /** 25 | * Returns the value of the 'Entity Type' attribute. 26 | * The literals are from the enumeration {@link roboML.RMLObject}. 27 | * 28 | * 29 | * @return the value of the 'Entity Type' attribute. 30 | * @see roboML.RMLObject 31 | * @see #setEntityType(RMLObject) 32 | * @see roboML.RoboMLPackage#getEntity_EntityType() 33 | * @model 34 | * @generated 35 | */ 36 | RMLObject getEntityType(); 37 | 38 | /** 39 | * Sets the value of the '{@link roboML.Entity#getEntityType Entity Type}' attribute. 40 | * 41 | * 42 | * @param value the new value of the 'Entity Type' attribute. 43 | * @see roboML.RMLObject 44 | * @see #getEntityType() 45 | * @generated 46 | */ 47 | void setEntityType(RMLObject value); 48 | 49 | } // Entity 50 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/MyDslStandaloneSetupGenerated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl; 5 | 6 | import com.google.inject.Guice; 7 | import com.google.inject.Injector; 8 | import org.eclipse.emf.ecore.resource.Resource; 9 | import org.eclipse.xtext.ISetup; 10 | import org.eclipse.xtext.common.TerminalsStandaloneSetup; 11 | import org.eclipse.xtext.resource.IResourceFactory; 12 | import org.eclipse.xtext.resource.IResourceServiceProvider; 13 | 14 | @SuppressWarnings("all") 15 | public class MyDslStandaloneSetupGenerated implements ISetup { 16 | 17 | @Override 18 | public Injector createInjectorAndDoEMFRegistration() { 19 | TerminalsStandaloneSetup.doSetup(); 20 | 21 | Injector injector = createInjector(); 22 | register(injector); 23 | return injector; 24 | } 25 | 26 | public Injector createInjector() { 27 | return Guice.createInjector(new MyDslRuntimeModule()); 28 | } 29 | 30 | public void register(Injector injector) { 31 | IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); 32 | IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); 33 | 34 | Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", resourceFactory); 35 | IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("mydsl", serviceProvider); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/simulator/ray.js: -------------------------------------------------------------------------------- 1 | class Ray { 2 | 3 | constructor(x, y, angle) { 4 | this.x = x; 5 | this.y = y; 6 | this.angle = angle 7 | this.v = p5.Vector.fromAngle(this.angle, 1000); 8 | this.poi = null; 9 | } 10 | 11 | show() { 12 | push(); 13 | stroke(10, 255, 10); 14 | translate(this.x, this.y); 15 | line(0, 0, this.v.x, this.v.y); 16 | pop(); 17 | } 18 | 19 | intersect() { 20 | let pois = []; 21 | for (var i = 0; i < entities.length; i++) { 22 | let e = entities[i]; 23 | let entityPOI = e.intersect(this); 24 | pois = pois.concat(entityPOI); 25 | } 26 | 27 | this.findClosestPoi(pois); 28 | } 29 | 30 | findClosestPoi(pois) { 31 | let idx = 0; 32 | let minDist = Infinity; 33 | if (pois.every(ele => ele === null)) { 34 | this.poi = null; 35 | } else { 36 | for (var i = 0; i < pois.length; i++) { 37 | if (pois[i] != null) { 38 | let d = dist(this.x, this.y, pois[i][0], pois[i][1]); 39 | if (d < minDist) { 40 | minDist = d; 41 | idx = i; 42 | } 43 | } 44 | } 45 | this.poi = pois[idx]; 46 | } 47 | this.setV(); 48 | } 49 | 50 | setV() { 51 | if (this.poi == null) { 52 | this.v = p5.Vector.fromAngle(this.angle, 1000); 53 | } else { 54 | this.v.x = this.poi[0] - this.x; 55 | this.v.y = this.poi[1] - this.y; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/fuzzy_table.h: -------------------------------------------------------------------------------- 1 | 2 | #if 0 3 | #ifndef _PID_TABLE_H_ 4 | #define _PID_TABLE_H_ 5 | 6 | #define PB 6 7 | #define PM 5 8 | #define PS 4 9 | #define ZO 3 10 | #define NS 2 11 | #define NM 1 12 | #define NB 0 13 | 14 | #define DELTA_KP_IDX 0 15 | #define DELATA_KI_IDX 1 16 | #define ERR 7 17 | #define DELTA_ERR 7 18 | 19 | 20 | const char pid_tbl[2][7][7]={ 21 | { 22 | {PB,PB,PM,PM,PS,ZO,ZO}, 23 | {PB,PB,PM,PS,PS,ZO,ZO}, 24 | {PM,PM,PM,PS,ZO,NS,NS}, 25 | {PM,PM,PS,ZO,NS,NM,NM}, 26 | {PS,PS,ZO,NS,NS,NM,NM}, 27 | {PS,ZO,NS,NM,NM,NM,NB}, 28 | {ZO,ZO,NM,NM,NM,NB,NB}, 29 | }, 30 | 31 | { 32 | {NB,NB,NM,NM,NS,ZO,ZO}, 33 | {NB,NB,NM,NS,NS,ZO,ZO}, 34 | {NB,NM,NS,NS,ZO,PS,PS}, 35 | {NM,NM,NS,ZO,PS,PM,PM}, 36 | {NM,NS,ZO,PS,PS,PM,PB}, 37 | {ZO,ZO,PS,PS,PM,PB,PB}, 38 | {ZO,ZO,PS,PM,PM,PB,PB}, 39 | }, 40 | }; 41 | 42 | const float kp_tbl[ERR] = { 43 | 0.07987, 44 | 0.08974, 45 | 0.09948, 46 | 0.12922, 47 | 0.54896, 48 | 0.70000, 49 | 0.76000, 50 | }; 51 | 52 | 53 | const float ki_tbl[DELTA_ERR] = { 54 | 0.02451, 55 | 0.07353, 56 | 0.14706, 57 | 0.19608, 58 | 0.24510, 59 | 0.30000, 60 | 0.00000, 61 | }; 62 | 63 | #endif _PID_TABLE_H_ 64 | 65 | #endif 66 | 67 | -------------------------------------------------------------------------------- /src-gen/roboML/Movement.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Movement'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Movement#getMovementType Movement Type}
  • 17 | *
18 | * 19 | * @see roboML.RoboMLPackage#getMovement() 20 | * @model 21 | * @generated 22 | */ 23 | public interface Movement extends EObject { 24 | /** 25 | * Returns the value of the 'Movement Type' attribute. 26 | * The literals are from the enumeration {@link roboML.Direction}. 27 | * 28 | * 29 | * @return the value of the 'Movement Type' attribute. 30 | * @see roboML.Direction 31 | * @see #setMovementType(Direction) 32 | * @see roboML.RoboMLPackage#getMovement_MovementType() 33 | * @model 34 | * @generated 35 | */ 36 | Direction getMovementType(); 37 | 38 | /** 39 | * Sets the value of the '{@link roboML.Movement#getMovementType Movement Type}' attribute. 40 | * 41 | * 42 | * @param value the new value of the 'Movement Type' attribute. 43 | * @see roboML.Direction 44 | * @see #getMovementType() 45 | * @generated 46 | */ 47 | void setMovementType(Direction value); 48 | 49 | } // Movement 50 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/simulator/ray.js: -------------------------------------------------------------------------------- 1 | class Ray { 2 | 3 | constructor(x, y, angle) { 4 | this.x = x; 5 | this.y = y; 6 | this.angle = angle 7 | this.v = p5.Vector.fromAngle(this.angle, 1000); 8 | this.poi = null; 9 | } 10 | 11 | show() { 12 | push(); 13 | stroke(10, 255, 10); 14 | translate(this.x, this.y); 15 | line(0, 0, this.v.x, this.v.y); 16 | pop(); 17 | } 18 | 19 | intersect() { 20 | let pois = []; 21 | for (var i = 0; i < entities.length; i++) { 22 | let e = entities[i]; 23 | let entityPOI = e.intersect(this); 24 | pois = pois.concat(entityPOI); 25 | } 26 | 27 | this.findClosestPoi(pois); 28 | } 29 | 30 | findClosestPoi(pois) { 31 | let idx = 0; 32 | let minDist = Infinity; 33 | if (pois.every(ele => ele === null)) { 34 | this.poi = null; 35 | } else { 36 | for (var i = 0; i < pois.length; i++) { 37 | if (pois[i] != null) { 38 | let d = dist(this.x, this.y, pois[i][0], pois[i][1]); 39 | if (d < minDist) { 40 | minDist = d; 41 | idx = i; 42 | } 43 | } 44 | } 45 | this.poi = pois[idx]; 46 | } 47 | this.setV(); 48 | } 49 | 50 | setV() { 51 | if (this.poi == null) { 52 | this.v = p5.Vector.fromAngle(this.angle, 1000); 53 | } else { 54 | this.v.x = this.poi[0] - this.x; 55 | this.v.y = this.poi[1] - this.y; 56 | } 57 | } 58 | } -------------------------------------------------------------------------------- /langium/Robot_ML/esbuild.mjs: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | import * as esbuild from 'esbuild'; 3 | 4 | const watch = process.argv.includes('--watch'); 5 | const minify = process.argv.includes('--minify'); 6 | 7 | const success = watch ? 'Watch build succeeded' : 'Build succeeded'; 8 | 9 | function getTime() { 10 | const date = new Date(); 11 | return `[${`${padZeroes(date.getHours())}:${padZeroes(date.getMinutes())}:${padZeroes(date.getSeconds())}`}] `; 12 | } 13 | 14 | function padZeroes(i) { 15 | return i.toString().padStart(2, '0'); 16 | } 17 | 18 | const plugins = [{ 19 | name: 'watch-plugin', 20 | setup(build) { 21 | build.onEnd(result => { 22 | if (result.errors.length === 0) { 23 | console.log(getTime() + success); 24 | } 25 | }); 26 | }, 27 | }]; 28 | 29 | const ctx = await esbuild.context({ 30 | // Entry points for the vscode extension and the language server 31 | entryPoints: ['src/extension/main.ts', 'src/language/main.ts'], 32 | outdir: 'out', 33 | bundle: true, 34 | target: "ES2017", 35 | // VSCode's extension host is still using cjs, so we need to transform the code 36 | format: 'cjs', 37 | // To prevent confusing node, we explicitly use the `.cjs` extension 38 | outExtension: { 39 | '.js': '.cjs' 40 | }, 41 | loader: { '.ts': 'ts' }, 42 | external: ['vscode'], 43 | platform: 'node', 44 | sourcemap: !minify, 45 | minify, 46 | plugins 47 | }); 48 | 49 | if (watch) { 50 | await ctx.watch(); 51 | } else { 52 | await ctx.rebuild(); 53 | ctx.dispose(); 54 | } 55 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/simulator/robot.js: -------------------------------------------------------------------------------- 1 | class Robot { 2 | constructor(factor, _x = 0, _y = 0, _width = 50, _height = 75, _angle = 0) { 3 | this.factor = factor; 4 | // x and y represent the center of the robot 5 | this.x = _x; 6 | this.y = _y; 7 | this.angle = _angle; 8 | this.width = _width; 9 | this.height = _height; 10 | } 11 | 12 | show() { 13 | push(); 14 | const canvasX = this.x * this.factor; 15 | const canvasY = this.y * this.factor; 16 | translate(canvasX, canvasY); 17 | rotate(this.angle); 18 | stroke(255, 255, 255); 19 | rect(-this.height/2, -this.width/2, this.height, this.width); 20 | stroke(255, 0, 0); 21 | fill(255, 0, 0); 22 | const h = (Math.sqrt(3)/2) * (this.width/3) 23 | triangle(-0.5*h, -(this.height/6), -0.5*h, this.height/6, 0.5*h, 0); 24 | pop(); 25 | 26 | 27 | } 28 | 29 | turn(angle){ 30 | this.angle += angle; 31 | if(this.angle<0){ 32 | this.angle += 360; 33 | } else if (this.angle >= 360){ 34 | this.angle -= 360; 35 | } 36 | } 37 | 38 | move(dist){ 39 | // delay the execution 40 | let anglecos = cos(this.angle); 41 | let anglesin = sin(this.angle); 42 | this.x += anglecos*dist; 43 | this.y += anglesin*dist; 44 | } 45 | 46 | side(dist){ 47 | let anglecos = cos(this.angle); 48 | let anglesin = sin(this.angle); 49 | this.x += -anglesin*dist; 50 | this.y += anglecos*dist; 51 | } 52 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/simulator/robot.js: -------------------------------------------------------------------------------- 1 | class Robot { 2 | constructor(factor, _x = 0, _y = 0, _width = 50, _height = 75, _angle = 0) { 3 | this.factor = factor; 4 | // x and y represent the center of the robot 5 | this.x = _x; 6 | this.y = _y; 7 | this.angle = _angle; 8 | this.width = _width; 9 | this.height = _height; 10 | } 11 | 12 | show() { 13 | push(); 14 | const canvasX = this.x * this.factor; 15 | const canvasY = this.y * this.factor; 16 | translate(canvasX, canvasY); 17 | rotate(this.angle); 18 | stroke(255, 255, 255); 19 | rect(-this.height/2, -this.width/2, this.height, this.width); 20 | circle(0, 0, this.height); 21 | stroke(255, 0, 0); 22 | fill(255, 0, 0); 23 | const h = (Math.sqrt(3)/2) * (this.width/3) 24 | triangle(-0.5*h, -(this.height/6), -0.5*h, this.height/6, 0.5*h, 0); 25 | pop(); 26 | 27 | 28 | } 29 | 30 | turn(angle){ 31 | this.angle += angle; 32 | if(this.angle<0){ 33 | this.angle += 360; 34 | } else if (this.angle >= 360){ 35 | this.angle -= 360; 36 | } 37 | } 38 | 39 | move(dist){ 40 | let anglecos = cos(this.angle); 41 | let anglesin = sin(this.angle); 42 | this.x += anglecos*dist; 43 | this.y += anglesin*dist; 44 | } 45 | 46 | side(dist){ 47 | let anglecos = cos(this.angle); 48 | let anglesin = sin(this.angle); 49 | this.x += -anglesin*dist; 50 | this.y += anglecos*dist; 51 | } 52 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/simulator/sketch.js: -------------------------------------------------------------------------------- 1 | function setup() { 2 | createCanvas(1000, 1000, document.getElementById("simulator")); 3 | window.entities = []; 4 | window.p5robot = null; 5 | window.time = 0; 6 | window.lastTimestamp = 0; 7 | window.scene = null; 8 | window.p5robot = new Robot(1, width/2, height/2); 9 | } 10 | 11 | function draw() { 12 | background(0); 13 | stroke(255); 14 | strokeWeight(1); 15 | 16 | for (var e = 0; e < window.entities.length; e++) { 17 | window.entities[e].show(); 18 | } 19 | 20 | if(window.scene !== null && window.scene.timestamps.length > lastTimestamp + 1){ 21 | time += deltaTime 22 | updateRobot(); 23 | } 24 | 25 | if(window.p5robot !== null){ 26 | window.p5robot.show(); 27 | } 28 | } 29 | 30 | function updateRobot(){ 31 | const lastKnownState = window.scene.timestamps[window.lastTimestamp]; 32 | const nextKnownState = window.scene.timestamps[window.lastTimestamp+1]; 33 | 34 | window.p5robot.x = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.pos.x, nextKnownState.pos.x, true) 35 | window.p5robot.y = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.pos.y, nextKnownState.pos.y, true) 36 | window.p5robot.angle = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.rad, nextKnownState.rad, true) 37 | 38 | if(window.time >= nextKnownState.time){ 39 | window.time = nextKnownState.time; 40 | window.lastTimestamp++; 41 | } 42 | } 43 | 44 | function resetSimulation() { 45 | window.time = 0; 46 | window.lastTimestamp = 0; 47 | } 48 | 49 | window.setup = setup 50 | window.resetSimulation = resetSimulation -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/interpretor/interpreorts: -------------------------------------------------------------------------------- 1 | import * as ts from 'typescript'; 2 | import * as fs from 'fs'; 3 | import { RoboMlServices } from './robo-ml-module'; // Adjust the path 4 | 5 | function readCodeFromFile(filePath: string): string { 6 | return fs.readFileSync(filePath, 'utf-8'); 7 | } 8 | 9 | function convertCodeToAST(code: string): ts.Node { 10 | const sourceFile = ts.createSourceFile( 11 | 'temp.ts', // You can provide a meaningful file name 12 | code, 13 | ts.ScriptTarget.Latest, 14 | true, 15 | ts.ScriptKind.TS 16 | ); 17 | 18 | return sourceFile; 19 | } 20 | 21 | function main() { 22 | // Replace with the path to your code file 23 | const codeFilePath = 'path/to/your/code.ts'; 24 | const code = readCodeFromFile(codeFilePath); 25 | 26 | // Set up services and register validation checks 27 | const services: RoboMlServices = { 28 | // Adjust accordingly 29 | validation: { 30 | ValidationRegistry: new YourValidationRegistry(), 31 | RoboMLValidator: new YourRoboMLValidator(), 32 | }, 33 | }; 34 | registerValidationChecks(services); 35 | 36 | // Convert code to AST 37 | const ast = convertCodeToAST(code); 38 | 39 | // Validate AST 40 | const validationAcceptor = new YourValidationAcceptor(); // Replace with your implementation 41 | services.validation.ValidationRegistry.validate(ast, validationAcceptor); 42 | 43 | // Check if there are errors 44 | if (validationAcceptor.hasErrors()) { 45 | console.error('Validation errors:', validationAcceptor.getErrors()); 46 | } else { 47 | console.log('Code is valid!'); 48 | } 49 | } 50 | 51 | // Run the main function 52 | main(); 53 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/simulator/sketch.js: -------------------------------------------------------------------------------- 1 | function setup() { 2 | createCanvas(1000, 1000, document.getElementById("simulator")); 3 | window.entities = []; 4 | window.p5robot = null; 5 | window.time = 0; 6 | window.lastTimestamp = 0; 7 | window.scene = null; 8 | window.p5robot = new Robot(1, width/2, height/2); 9 | } 10 | 11 | function draw() { 12 | background(0); 13 | stroke(255); 14 | strokeWeight(1); 15 | 16 | for (var e = 0; e < window.entities.length; e++) { 17 | window.entities[e].show(); 18 | } 19 | 20 | if(window.scene !== null && window.scene.timestamps.length > lastTimestamp + 1){ 21 | time += deltaTime 22 | updateRobot(); 23 | } 24 | 25 | if(window.p5robot !== null){ 26 | window.p5robot.show(); 27 | } 28 | } 29 | 30 | function updateRobot(){ 31 | const lastKnownState = window.scene.timestamps[window.lastTimestamp]; 32 | const nextKnownState = window.scene.timestamps[window.lastTimestamp+1]; 33 | 34 | window.p5robot.x = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.pos.x, nextKnownState.pos.x, true) 35 | window.p5robot.y = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.pos.y, nextKnownState.pos.y, true) 36 | window.p5robot.angle = map(window.time, lastKnownState.time, nextKnownState.time, lastKnownState.rad, nextKnownState.rad, true) 37 | 38 | if(window.time >= nextKnownState.time){ 39 | window.time = nextKnownState.time; 40 | window.lastTimestamp++; 41 | } 42 | } 43 | 44 | function resetSimulation() { 45 | window.time = 0; 46 | window.lastTimestamp = 0; 47 | } 48 | 49 | window.setup = setup 50 | window.resetSimulation = resetSimulation -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSyntacticSequencer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.serializer; 5 | 6 | import com.google.inject.Inject; 7 | import java.util.List; 8 | import org.eclipse.emf.ecore.EObject; 9 | import org.eclipse.xtext.IGrammarAccess; 10 | import org.eclipse.xtext.RuleCall; 11 | import org.eclipse.xtext.nodemodel.INode; 12 | import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias; 13 | import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition; 14 | import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer; 15 | import org.xtext.example.mydsl.services.MyDslGrammarAccess; 16 | 17 | @SuppressWarnings("all") 18 | public class MyDslSyntacticSequencer extends AbstractSyntacticSequencer { 19 | 20 | protected MyDslGrammarAccess grammarAccess; 21 | 22 | @Inject 23 | protected void init(IGrammarAccess access) { 24 | grammarAccess = (MyDslGrammarAccess) access; 25 | } 26 | 27 | @Override 28 | protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) { 29 | return ""; 30 | } 31 | 32 | 33 | @Override 34 | protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) { 35 | if (transition.getAmbiguousSyntaxes().isEmpty()) return; 36 | List transitionNodes = collectNodes(fromNode, toNode); 37 | for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) { 38 | List syntaxNodes = getNodesFor(transitionNodes, syntax); 39 | acceptNodes(getLastNavigableState(), syntaxNodes); 40 | } 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/validator/validator.ts: -------------------------------------------------------------------------------- 1 | import type { ValidationAcceptor } from 'langium'; 2 | import * as InterfaceAST from '../generated/ast.js'; 3 | import type { RoboMlServices } from '../robo-ml-module.js'; 4 | 5 | // 1. Checker qu'une variable existe au moment de son assignation ou son appel 6 | // 2. Checker qu'une fonction existe 7 | 8 | export class RoboMLValidator { 9 | 10 | validateAssignement(node: InterfaceAST.Assignement, acceptor: ValidationAcceptor): void { 11 | 12 | if (!this.isValidEntry((node.entry as InterfaceAST.EntrySimple))) { 13 | console.log("Erreur : non"); 14 | } 15 | 16 | } 17 | 18 | validateCondition(node: InterfaceAST.Condition, acceptor: ValidationAcceptor): void { 19 | 20 | if (!node.statementIf || !node.statementElse) { 21 | console.log("Erreur : non"); 22 | } 23 | 24 | } 25 | 26 | private isValidEntry(entry: InterfaceAST.Entry): boolean { 27 | 28 | return entry !== null; 29 | } 30 | 31 | /* 32 | private isValidExpression(expression: InterfaceAST.Expression): boolean { 33 | 34 | return expression.elementA !== null && expression.elementB !== null; 35 | } 36 | */ 37 | 38 | } 39 | 40 | 41 | export function registerValidationChecks(services: RoboMlServices): void { 42 | const registry = services.validation.ValidationRegistry; 43 | const validator = new RoboMLValidator(); 44 | 45 | registry.register({ 46 | Assignement: (node: InterfaceAST.Assignement, acceptor: ValidationAcceptor) => validator.validateAssignement(node, acceptor), 47 | Condition: (node: InterfaceAST.Condition, acceptor: ValidationAcceptor) => validator.validateCondition(node, acceptor), 48 | 49 | }); 50 | } -------------------------------------------------------------------------------- /.github/workflows/deploy.yml: -------------------------------------------------------------------------------- 1 | # Simple workflow for deploying static content to GitHub Pages 2 | name: Deploy static content to Pages 3 | 4 | on: 5 | # Runs on pushes targeting the default branch 6 | push: 7 | branches: ['main'] 8 | 9 | # Allows you to run this workflow manually from the Actions tab 10 | workflow_dispatch: 11 | 12 | # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages 13 | permissions: 14 | contents: read 15 | pages: write 16 | id-token: write 17 | 18 | # Allow one concurrent deployment 19 | concurrency: 20 | group: 'pages' 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | # Single deploy job since we're just deploying 25 | deploy: 26 | environment: 27 | name: github-pages 28 | url: ${{ steps.deployment.outputs.page_url }} 29 | runs-on: ubuntu-latest 30 | defaults: 31 | run: 32 | working-directory: './langium/Robot_ML' 33 | steps: 34 | - name: Checkout 35 | uses: actions/checkout@v4 36 | - name: Set up Node 37 | uses: actions/setup-node@v3 38 | with: 39 | node-version: 18 40 | cache: 'npm' 41 | cache-dependency-path: '**/package-lock.json' # THIS PATTERN did the trick for me. 42 | - name: Install dependencies 43 | run: npm install 44 | - name: Generate Langium 45 | run: npm run langium:generate 46 | - name: Build 47 | run: npm run build:web 48 | - name: Setup Pages 49 | uses: actions/configure-pages@v3 50 | - name: Upload artifact 51 | uses: actions/upload-pages-artifact@v2 52 | with: 53 | # Upload dist repository 54 | path: ./langium/Robot_ML/public 55 | - name: Deploy to GitHub Pages 56 | id: deployment 57 | uses: actions/deploy-pages@v2 -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/GenerateMyDsl.mwe2: -------------------------------------------------------------------------------- 1 | module org.xtext.example.mydsl.GenerateMyDsl 2 | 3 | import org.eclipse.xtext.xtext.generator.* 4 | import org.eclipse.xtext.xtext.generator.model.project.* 5 | 6 | var rootPath = ".." 7 | 8 | Workflow { 9 | 10 | component = XtextGenerator { 11 | configuration = { 12 | project = StandardProjectConfig { 13 | baseName = "org.xtext.example.mydsl" 14 | rootPath = rootPath 15 | runtimeTest = { 16 | enabled = true 17 | } 18 | eclipsePlugin = { 19 | enabled = true 20 | } 21 | eclipsePluginTest = { 22 | enabled = true 23 | } 24 | createEclipseMetaData = true 25 | } 26 | code = { 27 | encoding = "UTF-8" 28 | lineDelimiter = "\r\n" 29 | fileHeader = "/*\n * generated by Xtext \${version}\n */" 30 | preferXtendStubs = false 31 | } 32 | } 33 | language = StandardLanguage { 34 | name = "org.xtext.example.mydsl.MyDsl" 35 | fileExtensions = "mydsl" 36 | referencedResource = "platform:/resource/RoboML/model/roboML.genmodel" 37 | 38 | fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {} 39 | 40 | fragment = io.typefox.xtext2langium.Xtext2LangiumFragment { 41 | outputPath = './langium' 42 | } 43 | 44 | formatter = { 45 | generateStub = true 46 | generateXtendStub = true 47 | } 48 | 49 | serializer = { 50 | generateStub = false 51 | } 52 | validator = { 53 | // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" 54 | // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage 55 | generateDeprecationValidation = true 56 | } 57 | generator = { 58 | generateXtendStub = true 59 | } 60 | junitSupport = { 61 | junitVersion = "5" 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2: -------------------------------------------------------------------------------- 1 | module org.xtext.example.mydsl.GenerateMyDsl 2 | 3 | import org.eclipse.xtext.xtext.generator.* 4 | import org.eclipse.xtext.xtext.generator.model.project.* 5 | 6 | var rootPath = ".." 7 | 8 | Workflow { 9 | 10 | component = XtextGenerator { 11 | configuration = { 12 | project = StandardProjectConfig { 13 | baseName = "org.xtext.example.mydsl" 14 | rootPath = rootPath 15 | runtimeTest = { 16 | enabled = true 17 | } 18 | eclipsePlugin = { 19 | enabled = true 20 | } 21 | eclipsePluginTest = { 22 | enabled = true 23 | } 24 | createEclipseMetaData = true 25 | } 26 | code = { 27 | encoding = "UTF-8" 28 | lineDelimiter = "\r\n" 29 | fileHeader = "/*\n * generated by Xtext \${version}\n */" 30 | preferXtendStubs = false 31 | } 32 | } 33 | language = StandardLanguage { 34 | name = "org.xtext.example.mydsl.MyDsl" 35 | fileExtensions = "mydsl" 36 | referencedResource = "platform:/resource/RoboML/model/roboML.genmodel" 37 | 38 | fragment = ecore2xtext.Ecore2XtextValueConverterServiceFragment2 auto-inject {} 39 | 40 | fragment = io.typefox.xtext2langium.Xtext2LangiumFragment { 41 | outputPath = './langium' 42 | } 43 | 44 | formatter = { 45 | generateStub = true 46 | generateXtendStub = true 47 | } 48 | 49 | serializer = { 50 | generateStub = false 51 | } 52 | validator = { 53 | // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" 54 | // Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage 55 | generateDeprecationValidation = true 56 | } 57 | generator = { 58 | generateXtendStub = true 59 | } 60 | junitSupport = { 61 | junitVersion = "5" 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/utility/twi.h: -------------------------------------------------------------------------------- 1 | /* 2 | twi.h - TWI/I2C library for Wiring & Arduino 3 | Copyright (c) 2006 Nicholas Zambetti. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef twi_h 21 | #define twi_h 22 | 23 | #include 24 | 25 | //#define ATMEGA8 26 | 27 | #ifndef CPU_FREQ 28 | #define CPU_FREQ 16000000L 29 | #endif 30 | 31 | #ifndef TWI_FREQ 32 | #define TWI_FREQ 100000L 33 | #endif 34 | 35 | #ifndef TWI_BUFFER_LENGTH 36 | #define TWI_BUFFER_LENGTH 32 37 | #endif 38 | 39 | #define TWI_READY 0 40 | #define TWI_MRX 1 41 | #define TWI_MTX 2 42 | #define TWI_SRX 3 43 | #define TWI_STX 4 44 | 45 | void twi_init(void); 46 | void twi_setAddress(uint8_t); 47 | uint8_t twi_readFrom(uint8_t, uint8_t*, uint8_t); 48 | uint8_t twi_writeTo(uint8_t, uint8_t*, uint8_t, uint8_t); 49 | uint8_t twi_transmit(uint8_t*, uint8_t); 50 | void twi_attachSlaveRxEvent( void (*)(uint8_t*, int) ); 51 | void twi_attachSlaveTxEvent( void (*)(void) ); 52 | void twi_reply(uint8_t); 53 | void twi_stop(void); 54 | void twi_releaseBus(void); 55 | 56 | #endif 57 | 58 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.launch/Generate MyDsl (mydsl) Language Infrastructure.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/Examples/PIDSample2/PIDSample2.pde: -------------------------------------------------------------------------------- 1 | /*************************************************** 2 | * Advanced PID Example 3 | * PID input: Analog input 0 4 | * output = time proportion on/off of output 0 (50% = 2 sec on, 2 sec off) 5 | * and just to make it more complicated: 6 | * - start with a setpoint ramp (0 to 500 over 5 minutes (300 seconds)) 7 | * - use gap control (moderate tunings when within 100 of setpoint, aggressive when outside 100) 8 | ***************************************************/ 9 | 10 | #include 11 | 12 | unsigned long windowStartTime; 13 | unsigned long RampStartTime; 14 | double Input, Output, Setpoint; 15 | PID pid(&Input, &Output, &Setpoint, 3,4,1); 16 | 17 | unsigned long printTime= millis(); 18 | 19 | void setup() 20 | { 21 | 22 | pid.SetOutputLimits(0,4000); //tell the PID to range the output from 0 to 4000 23 | Output = 4000; //start the output at its max and let the PID adjust it from there 24 | 25 | pid.SetMode(AUTO); //turn on the PID 26 | windowStartTime = millis(); 27 | RampStartTime = millis(); 28 | } 29 | 30 | 31 | void loop() 32 | { 33 | 34 | //Set Point Ramp 35 | if(millis()-RampStartTime<300000) 36 | { 37 | Setpoint = ((double)(millis()-RampStartTime))/(300000.0)*500.0; 38 | } 39 | else Setpoint = 500; 40 | 41 | //Set Tuning Parameters based on how close we are to setpoint 42 | if(abs(Setpoint-Input)>100)pid.SetTunings(6,4,1); //aggressive 43 | else pid.SetTunings(3,4,1); //comparatively moderate 44 | 45 | //give the PID the opportunity to compute if needed 46 | Input = analogRead(0); 47 | pid.Compute(); 48 | 49 | //turn the output pin on/off based on pid output 50 | if(millis()-windowStartTime>4000) windowStartTime+=4000; 51 | if(Output > millis()-windowStartTime) digitalWrite(0,HIGH); 52 | else digitalWrite(0,LOW); 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/program/RB0021_Omni4WD_PID/RB0021_Omni4WD_PID.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define _NAMIKI_MOTOR //for Namiki 22CL-103501PG80:1 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //#include 15 | //#include 16 | 17 | /* 18 | 19 | \ / 20 | wheel1 \ / wheel4 21 | Left \ / Right 22 | 23 | 24 | power switch 25 | 26 | / \ 27 | wheel2 / \ wheel3 28 | Right / \ Left 29 | 30 | */ 31 | 32 | /* 33 | irqISR(irq1,isr1); 34 | MotorWheel wheel1(5,4,12,13,&irq1); 35 | 36 | irqISR(irq2,isr2); 37 | MotorWheel wheel2(6,7,14,15,&irq2); 38 | 39 | irqISR(irq3,isr3); 40 | MotorWheel wheel3(9,8,16,17,&irq3); 41 | 42 | irqISR(irq4,isr4); 43 | MotorWheel wheel4(10,11,18,19,&irq4); 44 | */ 45 | 46 | irqISR(irq1, isr1); 47 | MotorWheel wheel1(3, 2, 4, 5, &irq1); 48 | 49 | irqISR(irq2, isr2); 50 | MotorWheel wheel2(11, 12, 14, 15, &irq2); 51 | 52 | irqISR(irq3, isr3); 53 | MotorWheel wheel3(9, 8, 16, 17, &irq3); 54 | 55 | irqISR(irq4, isr4); 56 | MotorWheel wheel4(10, 7, 18, 19, &irq4); 57 | 58 | 59 | Omni4WD Omni(&wheel1, &wheel2, &wheel3, &wheel4); 60 | 61 | int global_speed = 1; 62 | int global_rotation = 1; 63 | 64 | void setup() { 65 | Serial.begin(9600); 66 | 67 | //TCCR0B=TCCR0B&0xf8|0x01; // warning!! it will change millis() 68 | TCCR1B = TCCR1B & 0xf8 | 0x01; // Pin9,Pin10 PWM 31250Hz 69 | TCCR2B = TCCR2B & 0xf8 | 0x01; // Pin3,Pin11 PWM 31250Hz 70 | 71 | Omni.PIDEnable(0.31, 0.01, 0, 10); 72 | } 73 | 74 | void loop() { 75 | // Omni.demoActions(30,1500,500,false); 76 | main(); 77 | } 78 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/MotorWheel/diff.log: -------------------------------------------------------------------------------- 1 | 0a1 2 | > #include 3 | 2,19c3,4 4 | < /* 5 | < motorwheel library version 1.1,compatible with maple. 6 | < */ 7 | < 8 | < 9 | < /*for maple*/ 10 | < #if defined(BOARD_maple) || defined(BOARD_maple_native) || defined(BOARD_maple_mini) 11 | < #include "wirish.h" 12 | < #include "./../PID_Beta6/PID_Beta6.h" 13 | < #include "ext_interrupts.h" 14 | < 15 | < /*for arduino*/ 16 | < #else 17 | < #include 18 | < #include 19 | < #include 20 | < 21 | < #endif 22 | --- 23 | > #include 24 | > #include 25 | 38,40c23 26 | < /*for maple*/ 27 | < #if defined(BOARD_maple) || defined(BOARD_maple_native) || defined(BOARD_maple_mini) 28 | < #define MAX_PWM 3599 29 | --- 30 | > #define MAX_PWM 200 //255 31 | 42,46d24 32 | < /*for arduino*/ 33 | < #else 34 | < #define MAX_PWM 128 35 | < 36 | < #endif 37 | 62,63c40,41 38 | < #define KC 2.2 39 | < #define TAUI 1 40 | --- 41 | > #define KC 0.26 //0.17987 //0.066366//0.07637//0.07887 42 | > #define TAUI 0.02 //0.12451 //0.022505//0.02251//0.02451 43 | 121,124c99,102 44 | < unsigned int runPWM(unsigned int PWM,bool dir,bool saveDir=true); 45 | < unsigned int getPWM() const; 46 | < unsigned int advancePWM(unsigned int PWM); 47 | < unsigned int backoffPWM(unsigned int PWM); 48 | --- 49 | > unsigned char runPWM(unsigned char PWM,bool dir,bool saveDir=true); 50 | > unsigned char getPWM() const; 51 | > unsigned char advancePWM(unsigned char PWM); 52 | > unsigned char backoffPWM(unsigned char PWM); 53 | 152,155c130,133 54 | < unsigned char pinPWM; 55 | < unsigned char pinDir; 56 | < unsigned char pinIRQ; 57 | < unsigned char pinIRQB; 58 | --- 59 | > unsigned char pinPWM; 60 | > unsigned char pinDir; 61 | > unsigned char pinIRQ; 62 | > unsigned char pinIRQB; 63 | 159c137 64 | < unsigned int speedPWM; // current PWM 65 | --- 66 | > unsigned char speedPWM; // current PWM 67 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/static/easter-egg.js: -------------------------------------------------------------------------------- 1 | import { createEffect, createSignal } from './signals.js'; 2 | 3 | 4 | function getLetterString(letter) { 5 | switch (letter) { 6 | case 38: 7 | return '↑'; 8 | case 40: 9 | return '↓'; 10 | case 37: 11 | return '←'; 12 | case 39: 13 | return '→'; 14 | case 66: 15 | return 'B'; 16 | case 65: 17 | return 'A'; 18 | default: 19 | return letter; 20 | } 21 | } 22 | 23 | 24 | 25 | function easterEgg() { 26 | // if the user presses the keys "up, up, down, down, left, right, left, right, b, a" in this order, the easter egg will be triggered 27 | const konamiCode = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; 28 | 29 | const [currentLetters, setCurrentLetters] = createSignal([]); 30 | 31 | const letterContainer = document.getElementById('letter-container'); 32 | 33 | const letterHTML = (letter) => `
${getLetterString(letter)}
`; 34 | 35 | createEffect(() => { 36 | letterContainer.innerHTML = currentLetters().map(letter => letterHTML(letter)).join(''); 37 | }); 38 | 39 | 40 | let konamiCodePosition = 0; 41 | document.addEventListener('keydown', function (e) { 42 | if (e.keyCode === konamiCode[konamiCodePosition++]) { 43 | setCurrentLetters([...currentLetters(), e.keyCode]); 44 | if (konamiCodePosition === konamiCode.length) { 45 | konamiCodePosition = 0; 46 | setCurrentLetters([]); 47 | handleEasterEgg(); 48 | } 49 | } else { 50 | konamiCodePosition = 0; 51 | setCurrentLetters([]); 52 | } 53 | } 54 | ); 55 | } 56 | 57 | function handleEasterEgg() { 58 | window.location.href = "https://www.youtube.com/watch?v=0tOXxuLcaog"; 59 | } 60 | 61 | 62 | easterEgg(); -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/EEPROM/EEPROM.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | EEPROM.cpp - EEPROM library 3 | Copyright (c) 2006 David A. Mellis. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | /****************************************************************************** 21 | * Includes 22 | ******************************************************************************/ 23 | 24 | #include 25 | #include "Arduino.h" 26 | #include "EEPROM.h" 27 | 28 | /****************************************************************************** 29 | * Definitions 30 | ******************************************************************************/ 31 | 32 | /****************************************************************************** 33 | * Constructors 34 | ******************************************************************************/ 35 | 36 | /****************************************************************************** 37 | * User API 38 | ******************************************************************************/ 39 | 40 | uint8_t EEPROMClass::read(int address) 41 | { 42 | return eeprom_read_byte((unsigned char *) address); 43 | } 44 | 45 | void EEPROMClass::write(int address, uint8_t value) 46 | { 47 | eeprom_write_byte((unsigned char *) address, value); 48 | } 49 | 50 | EEPROMClass EEPROM; 51 | -------------------------------------------------------------------------------- /src-gen/roboML/Rotation.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Rotation'. 8 | * 9 | * 10 | *

11 | * The following features are supported: 12 | *

13 | *
    14 | *
  • {@link roboML.Rotation#getRotationAngle Rotation Angle}
  • 15 | *
  • {@link roboML.Rotation#getRotationSens Rotation Sens}
  • 16 | *
17 | * 18 | * @see roboML.RoboMLPackage#getRotation() 19 | * @model 20 | * @generated 21 | */ 22 | public interface Rotation extends Statement { 23 | /** 24 | * Returns the value of the 'Rotation Angle' reference. 25 | * 26 | * 27 | * @return the value of the 'Rotation Angle' reference. 28 | * @see #setRotationAngle(Entity) 29 | * @see roboML.RoboMLPackage#getRotation_RotationAngle() 30 | * @model required="true" 31 | * @generated 32 | */ 33 | Entity getRotationAngle(); 34 | 35 | /** 36 | * Sets the value of the '{@link roboML.Rotation#getRotationAngle Rotation Angle}' reference. 37 | * 38 | * 39 | * @param value the new value of the 'Rotation Angle' reference. 40 | * @see #getRotationAngle() 41 | * @generated 42 | */ 43 | void setRotationAngle(Entity value); 44 | 45 | /** 46 | * Returns the value of the 'Rotation Sens' reference. 47 | * 48 | * 49 | * @return the value of the 'Rotation Sens' reference. 50 | * @see #setRotationSens(Entity) 51 | * @see roboML.RoboMLPackage#getRotation_RotationSens() 52 | * @model required="true" 53 | * @generated 54 | */ 55 | Entity getRotationSens(); 56 | 57 | /** 58 | * Sets the value of the '{@link roboML.Rotation#getRotationSens Rotation Sens}' reference. 59 | * 60 | * 61 | * @param value the new value of the 'Rotation Sens' reference. 62 | * @see #getRotationSens() 63 | * @generated 64 | */ 65 | void setRotationSens(Entity value); 66 | 67 | } // Rotation 68 | -------------------------------------------------------------------------------- /src-gen/roboML/Assignement.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Assignement'. 8 | * 9 | * 10 | *

11 | * The following features are supported: 12 | *

13 | *
    14 | *
  • {@link roboML.Assignement#getAssignableVariable Assignable Variable}
  • 15 | *
  • {@link roboML.Assignement#getEntity Entity}
  • 16 | *
17 | * 18 | * @see roboML.RoboMLPackage#getAssignement() 19 | * @model 20 | * @generated 21 | */ 22 | public interface Assignement extends Statement { 23 | /** 24 | * Returns the value of the 'Assignable Variable' reference. 25 | * 26 | * 27 | * @return the value of the 'Assignable Variable' reference. 28 | * @see #setAssignableVariable(Variable) 29 | * @see roboML.RoboMLPackage#getAssignement_AssignableVariable() 30 | * @model 31 | * @generated 32 | */ 33 | Variable getAssignableVariable(); 34 | 35 | /** 36 | * Sets the value of the '{@link roboML.Assignement#getAssignableVariable Assignable Variable}' reference. 37 | * 38 | * 39 | * @param value the new value of the 'Assignable Variable' reference. 40 | * @see #getAssignableVariable() 41 | * @generated 42 | */ 43 | void setAssignableVariable(Variable value); 44 | 45 | /** 46 | * Returns the value of the 'Entity' reference. 47 | * 48 | * 49 | * @return the value of the 'Entity' reference. 50 | * @see #setEntity(Entity) 51 | * @see roboML.RoboMLPackage#getAssignement_Entity() 52 | * @model required="true" 53 | * @generated 54 | */ 55 | Entity getEntity(); 56 | 57 | /** 58 | * Sets the value of the '{@link roboML.Assignement#getEntity Entity}' reference. 59 | * 60 | * 61 | * @param value the new value of the 'Entity' reference. 62 | * @see #getEntity() 63 | * @generated 64 | */ 65 | void setEntity(Entity value); 66 | 67 | } // Assignement 68 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/cli/cli-util.ts: -------------------------------------------------------------------------------- 1 | import type { AstNode, LangiumDocument, LangiumServices } from 'langium'; 2 | import chalk from 'chalk'; 3 | import * as path from 'node:path'; 4 | import * as fs from 'node:fs'; 5 | import { URI } from 'langium'; 6 | 7 | export async function extractDocument(fileName: string, services: LangiumServices): Promise { 8 | const extensions = services.LanguageMetaData.fileExtensions; 9 | if (!extensions.includes(path.extname(fileName))) { 10 | console.error(chalk.yellow(`Please choose a file with one of these extensions: ${extensions}.`)); 11 | process.exit(1); 12 | } 13 | 14 | if (!fs.existsSync(fileName)) { 15 | console.error(chalk.red(`File ${fileName} does not exist.`)); 16 | process.exit(1); 17 | } 18 | 19 | const document = services.shared.workspace.LangiumDocuments.getOrCreateDocument(URI.file(path.resolve(fileName))); 20 | await services.shared.workspace.DocumentBuilder.build([document], { validation: true }); 21 | 22 | const validationErrors = (document.diagnostics ?? []).filter(e => e.severity === 1); 23 | if (validationErrors.length > 0) { 24 | console.error(chalk.red('There are validation errors:')); 25 | for (const validationError of validationErrors) { 26 | console.error(chalk.red( 27 | `line ${validationError.range.start.line + 1}: ${validationError.message} [${document.textDocument.getText(validationError.range)}]` 28 | )); 29 | } 30 | process.exit(1); 31 | } 32 | 33 | return document; 34 | } 35 | 36 | export async function extractAstNode(fileName: string, services: LangiumServices): Promise { 37 | return (await extractDocument(fileName, services)).parseResult?.value as T; 38 | } 39 | 40 | interface FilePathData { 41 | destination: string, 42 | name: string 43 | } 44 | 45 | export function extractDestinationAndName(filePath: string, destination: string | undefined): FilePathData { 46 | filePath = path.basename(filePath, path.extname(filePath)).replace(/[.-]/g, ''); 47 | return { 48 | destination: destination ?? path.join(path.dirname(filePath), 'generated'), 49 | name: path.basename(filePath) 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/Wire/Wire.h: -------------------------------------------------------------------------------- 1 | /* 2 | TwoWire.h - TWI/I2C library for Arduino & Wiring 3 | Copyright (c) 2006 Nicholas Zambetti. All right reserved. 4 | 5 | This library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | This library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with this library; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef TwoWire_h 21 | #define TwoWire_h 22 | 23 | #include 24 | 25 | #define BUFFER_LENGTH 32 26 | 27 | class TwoWire 28 | { 29 | private: 30 | static uint8_t rxBuffer[]; 31 | static uint8_t rxBufferIndex; 32 | static uint8_t rxBufferLength; 33 | 34 | static uint8_t txAddress; 35 | static uint8_t txBuffer[]; 36 | static uint8_t txBufferIndex; 37 | static uint8_t txBufferLength; 38 | 39 | static uint8_t transmitting; 40 | static void (*user_onRequest)(void); 41 | static void (*user_onReceive)(int); 42 | static void onRequestService(void); 43 | static void onReceiveService(uint8_t*, int); 44 | public: 45 | TwoWire(); 46 | void begin(); 47 | void begin(uint8_t); 48 | void begin(int); 49 | void beginTransmission(uint8_t); 50 | void beginTransmission(int); 51 | uint8_t endTransmission(void); 52 | uint8_t requestFrom(uint8_t, uint8_t); 53 | uint8_t requestFrom(int, int); 54 | void send(uint8_t); 55 | void send(uint8_t*, uint8_t); 56 | void send(int); 57 | void send(char*); 58 | uint8_t available(void); 59 | uint8_t receive(void); 60 | void onReceive( void (*)(int) ); 61 | void onRequest( void (*)(void) ); 62 | }; 63 | 64 | extern TwoWire Wire; 65 | 66 | #endif 67 | 68 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/PID_Beta6/Examples/PIDSample3/PIDSample3.pde: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /*************************************************** 5 | * Feed Forward Example : RepRap Extruder Nozzle Temperature 6 | * PID input: Nozzle Temperature 7 | * PID output: PWM signal (0-255) to the heater control 8 | * Other Input: Plastic Feed rate is being read on input 1 9 | * For the feed forward piece... 10 | * The amount of heat we want to add to the nozzle is largely dependent 11 | * on how fast plastic is being fed. if the feed is stopped we're going 12 | * to want a lot less heat than when the system is running. A pid 13 | * control by itself will eventually adjust the heat, but by then the temp 14 | * will be really high. feed forward can help with this. 15 | * so to make Feed Forward work, at every cycle we look at the current feed speed 16 | * and compute a "bias" which we feed to the pid controller. sort of: "Based on my 17 | * knowledge, your output should be about X. adjust off of that as you see fit" 18 | * What does it get you? well, the instant the feed stops, the baseline drops. That 19 | * means that the controller output immediately drops. if you had been using just a pid, 20 | * you'd have to wait for the temperature to rise quite a bit before seeing the same 21 | * drop in output. 22 | * 23 | * (for this example, we're assuming that for a feed rate of 1023 the output should be 24 | * about 130, and at a rate of 0 the output should be around 10) 25 | ***************************************************/ 26 | 27 | #include 28 | int FeedRate; 29 | 30 | double Input, Output, Setpoint, Bias; 31 | PID pid(&Input, &Output, &Setpoint, &Bias, 3, 4, 1); 32 | 33 | void setup() 34 | { 35 | Setpoint = 400; 36 | pid.SetMode(AUTO); //turn on the PID 37 | 38 | } 39 | 40 | 41 | void loop() 42 | { 43 | 44 | //Read in the Feed rate and compute a baseline output to the heater 45 | FeedRate = analogRead(1); //read the feed rate 46 | Bias = (FeedRate/1023)*(120)+10; 47 | 48 | //give the PID the opportunity to compute if needed 49 | Input = analogRead(0); 50 | pid.Compute(); 51 | 52 | analogWrite(0, Output); 53 | 54 | } 55 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/bin/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens: -------------------------------------------------------------------------------- 1 | ','=14 2 | 'ArithmeticExpression'=45 3 | 'Assignement'=34 4 | 'Condition'=39 5 | 'Deplacement'=25 6 | 'Divide'=67 7 | 'Entity'=42 8 | 'Function'=16 9 | 'FunctionCall'=44 10 | 'GetValue'=49 11 | 'Loop'=32 12 | 'Minus'=65 13 | 'Modulo'=68 14 | 'Multiplie'=66 15 | 'Plus'=64 16 | 'Power'=69 17 | 'RMLBoolean'=55 18 | 'RMLDouble'=54 19 | 'RMLFloat'=53 20 | 'RMLInt'=51 21 | 'RMLString'=52 22 | 'RoboMLProgram'=11 23 | 'Rotation'=29 24 | 'SetValue'=37 25 | 'Variable'=21 26 | 'VariableRef'=50 27 | 'arithmeticOperator'=46 28 | 'assignableVariable'=35 29 | 'backward'=57 30 | 'booleanExpression'=33 31 | 'cm'=62 32 | 'deplacementDistance'=28 33 | 'dm'=61 34 | 'elementA'=47 35 | 'elementB'=48 36 | 'entity'=36 37 | 'entityToSet'=38 38 | 'entityType'=43 39 | 'forward'=56 40 | 'function'=13 41 | 'instruction'=19 42 | 'm'=60 43 | 'mm'=63 44 | 'movementType'=26 45 | 'newAttribute'=17 46 | 'returnType'=18 47 | 'rotationAngle'=30 48 | 'rotationSens'=31 49 | 'sideLeft'=58 50 | 'sideRight'=59 51 | 'statementElse'=41 52 | 'statementIf'=40 53 | 'unit'=27 54 | 'variable'=20 55 | 'variableName'=22 56 | 'variableValue'=23 57 | 'variableref'=24 58 | '{'=12 59 | '}'=15 60 | RULE_ANY_OTHER=10 61 | RULE_ID=5 62 | RULE_INT=6 63 | RULE_ML_COMMENT=7 64 | RULE_SL_COMMENT=8 65 | RULE_STRING=4 66 | RULE_WS=9 67 | T__11=11 68 | T__12=12 69 | T__13=13 70 | T__14=14 71 | T__15=15 72 | T__16=16 73 | T__17=17 74 | T__18=18 75 | T__19=19 76 | T__20=20 77 | T__21=21 78 | T__22=22 79 | T__23=23 80 | T__24=24 81 | T__25=25 82 | T__26=26 83 | T__27=27 84 | T__28=28 85 | T__29=29 86 | T__30=30 87 | T__31=31 88 | T__32=32 89 | T__33=33 90 | T__34=34 91 | T__35=35 92 | T__36=36 93 | T__37=37 94 | T__38=38 95 | T__39=39 96 | T__40=40 97 | T__41=41 98 | T__42=42 99 | T__43=43 100 | T__44=44 101 | T__45=45 102 | T__46=46 103 | T__47=47 104 | T__48=48 105 | T__49=49 106 | T__50=50 107 | T__51=51 108 | T__52=52 109 | T__53=53 110 | T__54=54 111 | T__55=55 112 | T__56=56 113 | T__57=57 114 | T__58=58 115 | T__59=59 116 | T__60=60 117 | T__61=61 118 | T__62=62 119 | T__63=63 120 | T__64=64 121 | T__65=65 122 | T__66=66 123 | T__67=67 124 | T__68=68 125 | T__69=69 126 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/parser/antlr/internal/InternalMyDsl.tokens: -------------------------------------------------------------------------------- 1 | ','=14 2 | 'ArithmeticExpression'=45 3 | 'Assignement'=34 4 | 'Condition'=39 5 | 'Deplacement'=25 6 | 'Divide'=67 7 | 'Entity'=42 8 | 'Function'=16 9 | 'FunctionCall'=44 10 | 'GetValue'=49 11 | 'Loop'=32 12 | 'Minus'=65 13 | 'Modulo'=68 14 | 'Multiplie'=66 15 | 'Plus'=64 16 | 'Power'=69 17 | 'RMLBoolean'=55 18 | 'RMLDouble'=54 19 | 'RMLFloat'=53 20 | 'RMLInt'=51 21 | 'RMLString'=52 22 | 'RoboMLProgram'=11 23 | 'Rotation'=29 24 | 'SetValue'=37 25 | 'Variable'=21 26 | 'VariableRef'=50 27 | 'arithmeticOperator'=46 28 | 'assignableVariable'=35 29 | 'backward'=57 30 | 'booleanExpression'=33 31 | 'cm'=62 32 | 'deplacementDistance'=28 33 | 'dm'=61 34 | 'elementA'=47 35 | 'elementB'=48 36 | 'entity'=36 37 | 'entityToSet'=38 38 | 'entityType'=43 39 | 'forward'=56 40 | 'function'=13 41 | 'instruction'=19 42 | 'm'=60 43 | 'mm'=63 44 | 'movementType'=26 45 | 'newAttribute'=17 46 | 'returnType'=18 47 | 'rotationAngle'=30 48 | 'rotationSens'=31 49 | 'sideLeft'=58 50 | 'sideRight'=59 51 | 'statementElse'=41 52 | 'statementIf'=40 53 | 'unit'=27 54 | 'variable'=20 55 | 'variableName'=22 56 | 'variableValue'=23 57 | 'variableref'=24 58 | '{'=12 59 | '}'=15 60 | RULE_ANY_OTHER=10 61 | RULE_ID=5 62 | RULE_INT=6 63 | RULE_ML_COMMENT=7 64 | RULE_SL_COMMENT=8 65 | RULE_STRING=4 66 | RULE_WS=9 67 | T__11=11 68 | T__12=12 69 | T__13=13 70 | T__14=14 71 | T__15=15 72 | T__16=16 73 | T__17=17 74 | T__18=18 75 | T__19=19 76 | T__20=20 77 | T__21=21 78 | T__22=22 79 | T__23=23 80 | T__24=24 81 | T__25=25 82 | T__26=26 83 | T__27=27 84 | T__28=28 85 | T__29=29 86 | T__30=30 87 | T__31=31 88 | T__32=32 89 | T__33=33 90 | T__34=34 91 | T__35=35 92 | T__36=36 93 | T__37=37 94 | T__38=38 95 | T__39=39 96 | T__40=40 97 | T__41=41 98 | T__42=42 99 | T__43=43 100 | T__44=44 101 | T__45=45 102 | T__46=46 103 | T__47=47 104 | T__48=48 105 | T__49=49 106 | T__50=50 107 | T__51=51 108 | T__52=52 109 | T__53=53 110 | T__54=54 111 | T__55=55 112 | T__56=56 113 | T__57=57 114 | T__58=58 115 | T__59=59 116 | T__60=60 117 | T__61=61 118 | T__62=62 119 | T__63=63 120 | T__64=64 121 | T__65=65 122 | T__66=66 123 | T__67=67 124 | T__68=68 125 | T__69=69 126 | -------------------------------------------------------------------------------- /src-gen/roboML/Sensor.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Sensor'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Sensor#getSensorValue Sensor Value}
  • 17 | *
  • {@link roboML.Sensor#getGetSensorValue Get Sensor Value}
  • 18 | *
19 | * 20 | * @see roboML.RoboMLPackage#getSensor() 21 | * @model abstract="true" 22 | * @generated 23 | */ 24 | public interface Sensor extends EObject { 25 | /** 26 | * Returns the value of the 'Sensor Value' attribute. 27 | * The literals are from the enumeration {@link roboML.RMLObject}. 28 | * 29 | * 30 | * @return the value of the 'Sensor Value' attribute. 31 | * @see roboML.RMLObject 32 | * @see #setSensorValue(RMLObject) 33 | * @see roboML.RoboMLPackage#getSensor_SensorValue() 34 | * @model 35 | * @generated 36 | */ 37 | RMLObject getSensorValue(); 38 | 39 | /** 40 | * Sets the value of the '{@link roboML.Sensor#getSensorValue Sensor Value}' attribute. 41 | * 42 | * 43 | * @param value the new value of the 'Sensor Value' attribute. 44 | * @see roboML.RMLObject 45 | * @see #getSensorValue() 46 | * @generated 47 | */ 48 | void setSensorValue(RMLObject value); 49 | 50 | /** 51 | * Returns the value of the 'Get Sensor Value' reference. 52 | * 53 | * 54 | * @return the value of the 'Get Sensor Value' reference. 55 | * @see #setGetSensorValue(GetValue) 56 | * @see roboML.RoboMLPackage#getSensor_GetSensorValue() 57 | * @model 58 | * @generated 59 | */ 60 | GetValue getGetSensorValue(); 61 | 62 | /** 63 | * Sets the value of the '{@link roboML.Sensor#getGetSensorValue Get Sensor Value}' reference. 64 | * 65 | * 66 | * @param value the new value of the 'Get Sensor Value' reference. 67 | * @see #getGetSensorValue() 68 | * @generated 69 | */ 70 | void setGetSensorValue(GetValue value); 71 | 72 | } // Sensor 73 | -------------------------------------------------------------------------------- /src-gen/roboML/Speed.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.ecore.EObject; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Speed'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Speed#getDeplacementSpeed Deplacement Speed}
  • 17 | *
  • {@link roboML.Speed#getSetSpeedValue Set Speed Value}
  • 18 | *
19 | * 20 | * @see roboML.RoboMLPackage#getSpeed() 21 | * @model 22 | * @generated 23 | */ 24 | public interface Speed extends EObject { 25 | /** 26 | * Returns the value of the 'Deplacement Speed' attribute. 27 | * The literals are from the enumeration {@link roboML.RMLObject}. 28 | * 29 | * 30 | * @return the value of the 'Deplacement Speed' attribute. 31 | * @see roboML.RMLObject 32 | * @see #setDeplacementSpeed(RMLObject) 33 | * @see roboML.RoboMLPackage#getSpeed_DeplacementSpeed() 34 | * @model 35 | * @generated 36 | */ 37 | RMLObject getDeplacementSpeed(); 38 | 39 | /** 40 | * Sets the value of the '{@link roboML.Speed#getDeplacementSpeed Deplacement Speed}' attribute. 41 | * 42 | * 43 | * @param value the new value of the 'Deplacement Speed' attribute. 44 | * @see roboML.RMLObject 45 | * @see #getDeplacementSpeed() 46 | * @generated 47 | */ 48 | void setDeplacementSpeed(RMLObject value); 49 | 50 | /** 51 | * Returns the value of the 'Set Speed Value' reference. 52 | * 53 | * 54 | * @return the value of the 'Set Speed Value' reference. 55 | * @see #setSetSpeedValue(SetValue) 56 | * @see roboML.RoboMLPackage#getSpeed_SetSpeedValue() 57 | * @model required="true" 58 | * @generated 59 | */ 60 | SetValue getSetSpeedValue(); 61 | 62 | /** 63 | * Sets the value of the '{@link roboML.Speed#getSetSpeedValue Set Speed Value}' reference. 64 | * 65 | * 66 | * @param value the new value of the 'Set Speed Value' reference. 67 | * @see #getSetSpeedValue() 68 | * @generated 69 | */ 70 | void setSetSpeedValue(SetValue value); 71 | 72 | } // Speed 73 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/.launch/Launch Runtime Eclipse.launch: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src-gen/roboML/Loop.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Loop'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Loop#getInstruction Instruction}
  • 17 | *
  • {@link roboML.Loop#getVariable Variable}
  • 18 | *
  • {@link roboML.Loop#getBooleanExpression Boolean Expression}
  • 19 | *
20 | * 21 | * @see roboML.RoboMLPackage#getLoop() 22 | * @model 23 | * @generated 24 | */ 25 | public interface Loop extends Statement { 26 | /** 27 | * Returns the value of the 'Instruction' containment reference list. 28 | * The list contents are of type {@link roboML.Statement}. 29 | * 30 | * 31 | * @return the value of the 'Instruction' containment reference list. 32 | * @see roboML.RoboMLPackage#getLoop_Instruction() 33 | * @model containment="true" 34 | * @generated 35 | */ 36 | EList getInstruction(); 37 | 38 | /** 39 | * Returns the value of the 'Variable' containment reference list. 40 | * The list contents are of type {@link roboML.Variable}. 41 | * 42 | * 43 | * @return the value of the 'Variable' containment reference list. 44 | * @see roboML.RoboMLPackage#getLoop_Variable() 45 | * @model containment="true" 46 | * @generated 47 | */ 48 | EList getVariable(); 49 | 50 | /** 51 | * Returns the value of the 'Boolean Expression' reference. 52 | * 53 | * 54 | * @return the value of the 'Boolean Expression' reference. 55 | * @see #setBooleanExpression(Entity) 56 | * @see roboML.RoboMLPackage#getLoop_BooleanExpression() 57 | * @model 58 | * @generated 59 | */ 60 | Entity getBooleanExpression(); 61 | 62 | /** 63 | * Sets the value of the '{@link roboML.Loop#getBooleanExpression Boolean Expression}' reference. 64 | * 65 | * 66 | * @param value the new value of the 'Boolean Expression' reference. 67 | * @see #getBooleanExpression() 68 | * @generated 69 | */ 70 | void setBooleanExpression(Entity value); 71 | 72 | } // Loop 73 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/extension/main.ts: -------------------------------------------------------------------------------- 1 | import type { LanguageClientOptions, ServerOptions} from 'vscode-languageclient/node.js'; 2 | import * as vscode from 'vscode'; 3 | import * as path from 'node:path'; 4 | import { LanguageClient, TransportKind } from 'vscode-languageclient/node.js'; 5 | 6 | let client: LanguageClient; 7 | 8 | // This function is called when the extension is activated. 9 | export function activate(context: vscode.ExtensionContext): void { 10 | client = startLanguageClient(context); 11 | } 12 | 13 | // This function is called when the extension is deactivated. 14 | export function deactivate(): Thenable | undefined { 15 | if (client) { 16 | return client.stop(); 17 | } 18 | return undefined; 19 | } 20 | 21 | function startLanguageClient(context: vscode.ExtensionContext): LanguageClient { 22 | const serverModule = context.asAbsolutePath(path.join('out', 'language', 'main.cjs')); 23 | // The debug options for the server 24 | // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging. 25 | // By setting `process.env.DEBUG_BREAK` to a truthy value, the language server will wait until a debugger is attached. 26 | const debugOptions = { execArgv: ['--nolazy', `--inspect${process.env.DEBUG_BREAK ? '-brk' : ''}=${process.env.DEBUG_SOCKET || '6009'}`] }; 27 | 28 | // If the extension is launched in debug mode then the debug server options are used 29 | // Otherwise the run options are used 30 | const serverOptions: ServerOptions = { 31 | run: { module: serverModule, transport: TransportKind.ipc }, 32 | debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions } 33 | }; 34 | 35 | const fileSystemWatcher = vscode.workspace.createFileSystemWatcher('**/*.rml'); 36 | context.subscriptions.push(fileSystemWatcher); 37 | 38 | // Options to control the language client 39 | const clientOptions: LanguageClientOptions = { 40 | documentSelector: [{ scheme: 'file', language: 'robo-ml' }], 41 | synchronize: { 42 | // Notify the server about file changes to files contained in the workspace 43 | fileEvents: fileSystemWatcher 44 | } 45 | }; 46 | 47 | // Create the language client and start the client. 48 | const client = new LanguageClient( 49 | 'robo-ml', 50 | 'RoboML', 51 | serverOptions, 52 | clientOptions 53 | ); 54 | 55 | // Start the client. This will also launch the server 56 | client.start(); 57 | return client; 58 | } 59 | -------------------------------------------------------------------------------- /org.xtext.example.mydsl.copy/org.xtext.example.mydsl/xtend-gen/org/xtext/example/mydsl/formatting2/MyDslFormatter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * generated by Xtext 2.31.0 3 | */ 4 | package org.xtext.example.mydsl.formatting2; 5 | 6 | import com.google.inject.Inject; 7 | import java.util.Arrays; 8 | import org.eclipse.emf.common.util.EList; 9 | import org.eclipse.emf.ecore.EObject; 10 | import org.eclipse.xtext.formatting2.AbstractFormatter2; 11 | import org.eclipse.xtext.formatting2.IFormattableDocument; 12 | import org.eclipse.xtext.resource.XtextResource; 13 | import org.eclipse.xtext.xbase.lib.Extension; 14 | import org.xtext.example.mydsl.services.MyDslGrammarAccess; 15 | import roboML.Function; 16 | import roboML.RoboMLProgram; 17 | import roboML.Statement; 18 | import roboML.Variable; 19 | 20 | @SuppressWarnings("all") 21 | public class MyDslFormatter extends AbstractFormatter2 { 22 | @Inject 23 | @Extension 24 | private MyDslGrammarAccess _myDslGrammarAccess; 25 | 26 | protected void _format(final RoboMLProgram roboMLProgram, @Extension final IFormattableDocument document) { 27 | EList _function = roboMLProgram.getFunction(); 28 | for (final Function function : _function) { 29 | document.format(function); 30 | } 31 | } 32 | 33 | protected void _format(final Function function, @Extension final IFormattableDocument document) { 34 | EList _instruction = function.getInstruction(); 35 | for (final Statement statement : _instruction) { 36 | document.format(statement); 37 | } 38 | EList _variable = function.getVariable(); 39 | for (final Variable variable : _variable) { 40 | document.format(variable); 41 | } 42 | } 43 | 44 | public void format(final Object function, final IFormattableDocument document) { 45 | if (function instanceof XtextResource) { 46 | _format((XtextResource)function, document); 47 | return; 48 | } else if (function instanceof Function) { 49 | _format((Function)function, document); 50 | return; 51 | } else if (function instanceof RoboMLProgram) { 52 | _format((RoboMLProgram)function, document); 53 | return; 54 | } else if (function instanceof EObject) { 55 | _format((EObject)function, document); 56 | return; 57 | } else if (function == null) { 58 | _format((Void)null, document); 59 | return; 60 | } else if (function != null) { 61 | _format(function, document); 62 | return; 63 | } else { 64 | throw new IllegalArgumentException("Unhandled parameter types: " + 65 | Arrays.asList(function, document).toString()); 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /langium/Robot_ML/langium-quickstart.md: -------------------------------------------------------------------------------- 1 | # Welcome to your Langium VS Code Extension 2 | 3 | ## What's in the folder 4 | 5 | This folder contains all necessary files for your language extension. 6 | * `package.json` - the manifest file in which you declare your language support. 7 | * `language-configuration.json` - the language configuration used in the VS Code editor, defining the tokens that are used for comments and brackets. 8 | * `src/extension/main.ts` - the main code of the extension, which is responsible for launching a language server and client. 9 | * `src/language/robo-ml.langium` - the grammar definition of your language. 10 | * `src/language/main.ts` - the entry point of the language server process. 11 | * `src/language/robo-ml-module.ts` - the dependency injection module of your language implementation. Use this to register overridden and added services. 12 | * `src/language/robo-ml-validator.ts` - an example validator. You should change it to reflect the semantics of your language. 13 | * `src/cli/main.ts` - the entry point of the command line interface (CLI) of your language. 14 | * `src/cli/generator.ts` - the code generator used by the CLI to write output files from DSL documents. 15 | * `src/cli/cli-util.ts` - utility code for the CLI. 16 | 17 | ## Get up and running straight away 18 | 19 | * Run `npm run langium:generate` to generate TypeScript code from the grammar definition. 20 | * Run `npm run build` to compile all TypeScript code. 21 | * Press `F5` to open a new window with your extension loaded. 22 | * Create a new file with a file name suffix matching your language. 23 | * Verify that syntax highlighting, validation, completion etc. are working as expected. 24 | * Run `./bin/cli` to see options for the CLI; `./bin/cli generate ` generates code for a given DSL file. 25 | 26 | ## Make changes 27 | 28 | * Run `npm run watch` to have the TypeScript compiler run automatically after every change of the source files. 29 | * Run `npm run langium:watch` to have the Langium generator run automatically after every change of the grammar declaration. 30 | * You can relaunch the extension from the debug toolbar after making changes to the files listed above. 31 | * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. 32 | 33 | ## Install your extension 34 | 35 | * To start using your extension with VS Code, copy it into the `/.vscode/extensions` folder and restart Code. 36 | * To share your extension with the world, read the [VS Code documentation](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) about publishing an extension. 37 | 38 | ## To Go Further 39 | 40 | Documentation about the Langium framework is available at https://langium.org 41 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/robo-ml-module.ts: -------------------------------------------------------------------------------- 1 | import type { DefaultSharedModuleContext, LangiumServices, LangiumSharedServices, Module, PartialLangiumServices } from 'langium'; 2 | import { createDefaultModule, createDefaultSharedModule, inject } from 'langium'; 3 | import { RoboMlGeneratedModule, RoboMlGeneratedSharedModule } from './generated/module.js'; 4 | import { RoboMlValidator, registerValidationChecks } from './robo-ml-validator.js'; 5 | import { RoboMlAcceptWeaver, weaveAcceptMethods } from './accept-weaver.js'; 6 | 7 | /** 8 | * Declaration of custom services - add your own service classes here. 9 | */ 10 | export type RoboMlAddedServices = { 11 | validation: { 12 | RoboMlValidator: RoboMlValidator, 13 | RoboMlAcceptWeaver: RoboMlAcceptWeaver 14 | } 15 | } 16 | 17 | /** 18 | * Union of Langium default services and your custom services - use this as constructor parameter 19 | * of custom service classes. 20 | */ 21 | export type RoboMlServices = LangiumServices & RoboMlAddedServices 22 | 23 | /** 24 | * Dependency injection module that overrides Langium default services and contributes the 25 | * declared custom services. The Langium defaults can be partially specified to override only 26 | * selected services, while the custom services must be fully specified. 27 | */ 28 | export const RoboMlModule: Module = { 29 | validation: { 30 | RoboMlValidator: () => new RoboMlValidator(), 31 | RoboMlAcceptWeaver: () => new RoboMlAcceptWeaver() 32 | } 33 | }; 34 | 35 | /** 36 | * Create the full set of services required by Langium. 37 | * 38 | * First inject the shared services by merging two modules: 39 | * - Langium default shared services 40 | * - Services generated by langium-cli 41 | * 42 | * Then inject the language-specific services by merging three modules: 43 | * - Langium default language-specific services 44 | * - Services generated by langium-cli 45 | * - Services specified in this file 46 | * 47 | * @param context Optional module context with the LSP connection 48 | * @returns An object wrapping the shared services and the language-specific services 49 | */ 50 | export function createRoboMlServices(context: DefaultSharedModuleContext): { 51 | shared: LangiumSharedServices, 52 | RoboMl: RoboMlServices 53 | } { 54 | const shared = inject( 55 | createDefaultSharedModule(context), 56 | RoboMlGeneratedSharedModule 57 | ); 58 | const RoboMl = inject( 59 | createDefaultModule({ shared }), 60 | RoboMlGeneratedModule, 61 | RoboMlModule 62 | ); 63 | shared.ServiceRegistry.register(RoboMl); 64 | registerValidationChecks(RoboMl); 65 | weaveAcceptMethods(RoboMl); 66 | return { shared, RoboMl }; 67 | } 68 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/web/simulator/entities.ts: -------------------------------------------------------------------------------- 1 | import { Vector, Ray } from './utils.js'; 2 | import { Scene } from "./scene.js" 3 | 4 | export interface Entities { 5 | type:string; 6 | pos:Vector; 7 | size:Vector; 8 | 9 | intersect(ray: Ray) : Vector[]; 10 | } 11 | 12 | export class Robot implements Entities{ 13 | type:string = "Robot"; 14 | scene:Scene; 15 | pos:Vector; 16 | size:Vector; 17 | rad:number; // stored in radian 18 | speed:number 19 | 20 | constructor(pos:Vector, size:Vector, angle:number, speed:number, scene:Scene) { 21 | this.pos = pos; 22 | this.size = size; 23 | this.rad = angle * Math.PI / 180; 24 | this.speed = speed; 25 | this.scene = scene; 26 | } 27 | 28 | intersect(ray :Ray) : Vector[] { 29 | return [] as Vector[]; 30 | } 31 | 32 | turn(angle:number) : void { 33 | // To implement 34 | } 35 | 36 | move(dist:number) : void { 37 | // To implement 38 | } 39 | 40 | side(dist:number) : void { 41 | // To implement 42 | } 43 | 44 | getRay(){ 45 | return new Ray(this.pos, Vector.fromAngle(this.rad, 10000).scale(-1)); 46 | } 47 | } 48 | 49 | export class Timestamp extends Robot{ 50 | time:number; 51 | 52 | constructor(time:number, robot:Robot){ 53 | super(robot.pos.scale(1), robot.size.scale(1), robot.rad, robot.speed, robot.scene); 54 | this.rad = robot.rad; 55 | this.time = time; 56 | } 57 | } 58 | 59 | export class Block implements Entities{ 60 | type:string = "Block"; 61 | pos:Vector; 62 | size:Vector; 63 | 64 | constructor(pos:Vector, size:Vector) { 65 | this.pos = pos; 66 | this.size = size; 67 | } 68 | 69 | intersect(ray :Ray) : Vector[] { 70 | 71 | let getPOI = ray.getPoiFinder() 72 | let pois:(Vector|undefined)[] = new Array(4); 73 | pois[0] = getPOI(this.pos, this.pos.plus(this.size.projX())); 74 | pois[1] = getPOI(this.pos, this.pos.plus(this.size.projY())); 75 | pois[2] = getPOI(this.pos.plus(this.size.projX()), this.pos.plus(this.size)); 76 | pois[3] = getPOI(this.pos.plus(this.size.projY()), this.pos.plus(this.size)); 77 | 78 | return pois.filter(x => x !== undefined) as Vector[]; 79 | } 80 | } 81 | 82 | export class Wall implements Entities{ 83 | type:string = "Wall"; 84 | pos:Vector; 85 | size:Vector; 86 | 87 | constructor(p1:Vector, p2:Vector) { 88 | this.pos = p1; 89 | this.size = p2; 90 | } 91 | 92 | intersect(ray:Ray) : Vector[] { 93 | const poi = ray.getPoiFinder()(this.pos, this.size); 94 | return poi ? ([poi] as Vector[]) : ([] as Vector[]); 95 | } 96 | } -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/web/simulator/entities.ts: -------------------------------------------------------------------------------- 1 | import { Vector, Ray } from './utils.js'; 2 | import { Scene } from "./scene.js" 3 | 4 | export interface Entities { 5 | type:string; 6 | pos:Vector; 7 | size:Vector; 8 | 9 | intersect(ray: Ray) : Vector[]; 10 | } 11 | 12 | export class Robot implements Entities{ 13 | type:string = "Robot"; 14 | scene:Scene; 15 | pos:Vector; 16 | size:Vector; 17 | rad:number; // stored in radian 18 | speed:number 19 | 20 | constructor(pos:Vector, size:Vector, angle:number, speed:number, scene:Scene) { 21 | this.pos = pos; 22 | this.size = size; 23 | this.rad = angle * Math.PI / 180; 24 | this.speed = speed; 25 | this.scene = scene; 26 | } 27 | 28 | intersect(ray :Ray) : Vector[] { 29 | return [] as Vector[]; 30 | } 31 | 32 | turn(angle:number) : void { 33 | // To implement 34 | } 35 | 36 | move(dist:number) : void { 37 | // To implement 38 | } 39 | 40 | side(dist:number) : void { 41 | // To implement 42 | } 43 | 44 | getRay(){ 45 | return new Ray(this.pos, Vector.fromAngle(this.rad, 10000).scale(-1)); 46 | } 47 | } 48 | 49 | export class Timestamp extends Robot{ 50 | time:number; 51 | 52 | constructor(time:number, robot:Robot){ 53 | super(robot.pos.scale(1), robot.size.scale(1), robot.rad, robot.speed, robot.scene); 54 | this.rad = robot.rad; 55 | this.time = time; 56 | } 57 | } 58 | 59 | export class Block implements Entities{ 60 | type:string = "Block"; 61 | pos:Vector; 62 | size:Vector; 63 | 64 | constructor(pos:Vector, size:Vector) { 65 | this.pos = pos; 66 | this.size = size; 67 | } 68 | 69 | intersect(ray :Ray) : Vector[] { 70 | 71 | let getPOI = ray.getPoiFinder() 72 | let pois:(Vector|undefined)[] = new Array(4); 73 | pois[0] = getPOI(this.pos, this.pos.plus(this.size.projX())); 74 | pois[1] = getPOI(this.pos, this.pos.plus(this.size.projY())); 75 | pois[2] = getPOI(this.pos.plus(this.size.projX()), this.pos.plus(this.size)); 76 | pois[3] = getPOI(this.pos.plus(this.size.projY()), this.pos.plus(this.size)); 77 | 78 | return pois.filter(x => x !== undefined) as Vector[]; 79 | } 80 | } 81 | 82 | export class Wall implements Entities{ 83 | type:string = "Wall"; 84 | pos:Vector; 85 | size:Vector; 86 | 87 | constructor(p1:Vector, p2:Vector) { 88 | this.pos = p1; 89 | this.size = p2; 90 | } 91 | 92 | intersect(ray:Ray) : Vector[] { 93 | const poi = ray.getPoiFinder()(this.pos, this.size); 94 | return poi ? ([poi] as Vector[]) : ([] as Vector[]); 95 | } 96 | } -------------------------------------------------------------------------------- /langium/Robot_ML/files/square.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define _NAMIKI_MOTOR //for Namiki 22CL-103501PG80:1 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //#include 15 | //#include 16 | 17 | /* 18 | 19 | \ / 20 | wheel1 \ / wheel4 21 | Left \ / Right 22 | 23 | 24 | power switch 25 | 26 | / \ 27 | wheel2 / \ wheel3 28 | Right / \ Left 29 | 30 | */ 31 | 32 | /* 33 | irqISR(irq1,isr1); 34 | MotorWheel wheel1(5,4,12,13,&irq1); 35 | 36 | irqISR(irq2,isr2); 37 | MotorWheel wheel2(6,7,14,15,&irq2); 38 | 39 | irqISR(irq3,isr3); 40 | MotorWheel wheel3(9,8,16,17,&irq3); 41 | 42 | irqISR(irq4,isr4); 43 | MotorWheel wheel4(10,11,18,19,&irq4); 44 | */ 45 | 46 | irqISR(irq1, isr1); 47 | MotorWheel wheel1(3, 2, 4, 5, &irq1); 48 | 49 | irqISR(irq2, isr2); 50 | MotorWheel wheel2(11, 12, 14, 15, &irq2); 51 | 52 | irqISR(irq3, isr3); 53 | MotorWheel wheel3(9, 8, 16, 17, &irq3); 54 | 55 | irqISR(irq4, isr4); 56 | MotorWheel wheel4(10, 7, 18, 19, &irq4); 57 | 58 | 59 | Omni4WD Omni(&wheel1, &wheel2, &wheel3, &wheel4); 60 | 61 | int global_speed = 1; 62 | int global_rotation = 1; 63 | 64 | void setup() { 65 | Serial.begin(9600); 66 | 67 | //TCCR0B=TCCR0B&0xf8|0x01; // warning!! it will change millis() 68 | TCCR1B = TCCR1B & 0xf8 | 0x01; // Pin9,Pin10 PWM 31250Hz 69 | TCCR2B = TCCR2B & 0xf8 | 0x01; // Pin3,Pin11 PWM 31250Hz 70 | 71 | Omni.PIDEnable(0.31, 0.01, 0, 10); 72 | } 73 | 74 | void loop() { 75 | // Omni.demoActions(30,1500,500,false); 76 | main(); 77 | } 78 | 79 | 80 | void square() { 81 | int sideLength = 60; 82 | int rotationAngle = 90; 83 | int count = 0; 84 | while (count < 4) { 85 | Omni.setCarRotateRight(rotationAngle/ 180 * 3.1415926545 * global_rotation); 86 | Omni.delayMS(3000); 87 | Omni.setCarStop(); 88 | Omni.setCarBackoff(sideLength * 10 * global_speed); 89 | Omni.delayMS(1000); 90 | Omni.setCarStop(); 91 | Omni.setCarBackoff(sideLength * 10 * global_speed); 92 | Omni.delayMS(1000); 93 | Omni.setCarStop(); 94 | Omni.setCarBackoff(sideLength * 10 * global_speed); 95 | Omni.delayMS(1000); 96 | Omni.setCarStop(); 97 | Omni.setCarBackoff(sideLength * 10 * global_speed); 98 | Omni.delayMS(1000); 99 | Omni.setCarStop(); 100 | count = count + 1; 101 | } 102 | } 103 | 104 | void main() { 105 | global_speed = 250; 106 | int count = 0; 107 | while (count < 1) { 108 | count = count + 1; 109 | square() 110 | } 111 | } 112 | 113 | -------------------------------------------------------------------------------- /langium/Robot_ML/files/spiral.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define _NAMIKI_MOTOR //for Namiki 22CL-103501PG80:1 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //#include 15 | //#include 16 | 17 | /* 18 | 19 | \ / 20 | wheel1 \ / wheel4 21 | Left \ / Right 22 | 23 | 24 | power switch 25 | 26 | / \ 27 | wheel2 / \ wheel3 28 | Right / \ Left 29 | 30 | */ 31 | 32 | /* 33 | irqISR(irq1,isr1); 34 | MotorWheel wheel1(5,4,12,13,&irq1); 35 | 36 | irqISR(irq2,isr2); 37 | MotorWheel wheel2(6,7,14,15,&irq2); 38 | 39 | irqISR(irq3,isr3); 40 | MotorWheel wheel3(9,8,16,17,&irq3); 41 | 42 | irqISR(irq4,isr4); 43 | MotorWheel wheel4(10,11,18,19,&irq4); 44 | */ 45 | 46 | irqISR(irq1, isr1); 47 | MotorWheel wheel1(3, 2, 4, 5, &irq1); 48 | 49 | irqISR(irq2, isr2); 50 | MotorWheel wheel2(11, 12, 14, 15, &irq2); 51 | 52 | irqISR(irq3, isr3); 53 | MotorWheel wheel3(9, 8, 16, 17, &irq3); 54 | 55 | irqISR(irq4, isr4); 56 | MotorWheel wheel4(10, 7, 18, 19, &irq4); 57 | 58 | 59 | Omni4WD Omni(&wheel1, &wheel2, &wheel3, &wheel4); 60 | 61 | int global_speed = 1; 62 | int global_rotation = 1; 63 | 64 | void setup() { 65 | Serial.begin(9600); 66 | 67 | //TCCR0B=TCCR0B&0xf8|0x01; // warning!! it will change millis() 68 | TCCR1B = TCCR1B & 0xf8 | 0x01; // Pin9,Pin10 PWM 31250Hz 69 | TCCR2B = TCCR2B & 0xf8 | 0x01; // Pin3,Pin11 PWM 31250Hz 70 | 71 | Omni.PIDEnable(0.31, 0.01, 0, 10); 72 | } 73 | 74 | void loop() { 75 | // Omni.demoActions(30,1500,500,false); 76 | main(); 77 | } 78 | 79 | 80 | void spiral() { 81 | int sideLength = 10; 82 | int rotationAngle = 20; 83 | int count = 0; 84 | while (count < 100) { 85 | Omni.setCarRotateLeft(rotationAngle/ 180 * 3.1415926545 * global_rotation); 86 | Omni.delayMS(3000); 87 | Omni.setCarStop(); 88 | Omni.setCarLeft(sideLength * global_speed); 89 | Omni.delayMS(1000); 90 | Omni.setCarStop(); 91 | Omni.setCarLeft(sideLength * global_speed); 92 | Omni.delayMS(1000); 93 | Omni.setCarStop(); 94 | Omni.setCarLeft(sideLength * global_speed); 95 | Omni.delayMS(1000); 96 | Omni.setCarStop(); 97 | Omni.setCarLeft(sideLength * global_speed); 98 | Omni.delayMS(1000); 99 | Omni.setCarStop(); 100 | count = count + 1; 101 | sideLength = sideLength + 2; 102 | } 103 | } 104 | 105 | void main() { 106 | global_speed = 250; 107 | int count = 0; 108 | while (count < 1) { 109 | count = count + 1; 110 | spiral() 111 | } 112 | } 113 | 114 | -------------------------------------------------------------------------------- /langium/Robot_ML/files/triangle.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #define _NAMIKI_MOTOR //for Namiki 22CL-103501PG80:1 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | //#include 15 | //#include 16 | 17 | /* 18 | 19 | \ / 20 | wheel1 \ / wheel4 21 | Left \ / Right 22 | 23 | 24 | power switch 25 | 26 | / \ 27 | wheel2 / \ wheel3 28 | Right / \ Left 29 | 30 | */ 31 | 32 | /* 33 | irqISR(irq1,isr1); 34 | MotorWheel wheel1(5,4,12,13,&irq1); 35 | 36 | irqISR(irq2,isr2); 37 | MotorWheel wheel2(6,7,14,15,&irq2); 38 | 39 | irqISR(irq3,isr3); 40 | MotorWheel wheel3(9,8,16,17,&irq3); 41 | 42 | irqISR(irq4,isr4); 43 | MotorWheel wheel4(10,11,18,19,&irq4); 44 | */ 45 | 46 | irqISR(irq1, isr1); 47 | MotorWheel wheel1(3, 2, 4, 5, &irq1); 48 | 49 | irqISR(irq2, isr2); 50 | MotorWheel wheel2(11, 12, 14, 15, &irq2); 51 | 52 | irqISR(irq3, isr3); 53 | MotorWheel wheel3(9, 8, 16, 17, &irq3); 54 | 55 | irqISR(irq4, isr4); 56 | MotorWheel wheel4(10, 7, 18, 19, &irq4); 57 | 58 | 59 | Omni4WD Omni(&wheel1, &wheel2, &wheel3, &wheel4); 60 | 61 | int global_speed = 1; 62 | int global_rotation = 1; 63 | 64 | void setup() { 65 | Serial.begin(9600); 66 | 67 | //TCCR0B=TCCR0B&0xf8|0x01; // warning!! it will change millis() 68 | TCCR1B = TCCR1B & 0xf8 | 0x01; // Pin9,Pin10 PWM 31250Hz 69 | TCCR2B = TCCR2B & 0xf8 | 0x01; // Pin3,Pin11 PWM 31250Hz 70 | 71 | Omni.PIDEnable(0.31, 0.01, 0, 10); 72 | } 73 | 74 | void loop() { 75 | // Omni.demoActions(30,1500,500,false); 76 | main(); 77 | } 78 | 79 | 80 | void triangle() { 81 | int sideLength = 100; 82 | int rotationAngle = 120; 83 | int count = 0; 84 | while (count < 3) { 85 | Omni.setCarRotateRight(rotationAngle/ 180 * 3.1415926545 * global_rotation); 86 | Omni.delayMS(3000); 87 | Omni.setCarStop(); 88 | Omni.setCarAdvance(sideLength * 10 * global_speed); 89 | Omni.delayMS(1000); 90 | Omni.setCarStop(); 91 | Omni.setCarAdvance(sideLength * 10 * global_speed); 92 | Omni.delayMS(1000); 93 | Omni.setCarStop(); 94 | Omni.setCarAdvance(sideLength * 10 * global_speed); 95 | Omni.delayMS(1000); 96 | Omni.setCarStop(); 97 | count = count + 1; 98 | } 99 | } 100 | 101 | void main() { 102 | global_speed = 150; 103 | Omni.setCarRotateRight(60/ 180 * 3.1415926545 * global_rotation); 104 | Omni.delayMS(3000); 105 | Omni.setCarStop(); 106 | int count = 0; 107 | while (count < 1) { 108 | count = count + 1; 109 | triangle() 110 | } 111 | } 112 | 113 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/interpreter/src/static/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | RoboML in Langium 8 | 9 | 10 | 11 | 12 | 13 | 14 |

RoboML in Langium

15 |
16 | 17 | 18 | 19 | 20 |
21 | 22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 |
30 | 31 |
32 |
33 | 34 | 44 | 45 | 57 | 58 |
59 |

Powered by

60 | Langium 61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src-gen/roboML/Variable.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | import org.eclipse.emf.ecore.EObject; 7 | 8 | /** 9 | * 10 | * A representation of the model object 'Variable'. 11 | * 12 | * 13 | *

14 | * The following features are supported: 15 | *

16 | *
    17 | *
  • {@link roboML.Variable#getVariableName Variable Name}
  • 18 | *
  • {@link roboML.Variable#getVariableValue Variable Value}
  • 19 | *
  • {@link roboML.Variable#getVariableref Variableref}
  • 20 | *
21 | * 22 | * @see roboML.RoboMLPackage#getVariable() 23 | * @model 24 | * @generated 25 | */ 26 | public interface Variable extends EObject { 27 | /** 28 | * Returns the value of the 'Variable Name' attribute. 29 | * The literals are from the enumeration {@link roboML.RMLObject}. 30 | * 31 | * 32 | * @return the value of the 'Variable Name' attribute. 33 | * @see roboML.RMLObject 34 | * @see #setVariableName(RMLObject) 35 | * @see roboML.RoboMLPackage#getVariable_VariableName() 36 | * @model 37 | * @generated 38 | */ 39 | RMLObject getVariableName(); 40 | 41 | /** 42 | * Sets the value of the '{@link roboML.Variable#getVariableName Variable Name}' attribute. 43 | * 44 | * 45 | * @param value the new value of the 'Variable Name' attribute. 46 | * @see roboML.RMLObject 47 | * @see #getVariableName() 48 | * @generated 49 | */ 50 | void setVariableName(RMLObject value); 51 | 52 | /** 53 | * Returns the value of the 'Variable Value' attribute. 54 | * The literals are from the enumeration {@link roboML.RMLObject}. 55 | * 56 | * 57 | * @return the value of the 'Variable Value' attribute. 58 | * @see roboML.RMLObject 59 | * @see #setVariableValue(RMLObject) 60 | * @see roboML.RoboMLPackage#getVariable_VariableValue() 61 | * @model 62 | * @generated 63 | */ 64 | RMLObject getVariableValue(); 65 | 66 | /** 67 | * Sets the value of the '{@link roboML.Variable#getVariableValue Variable Value}' attribute. 68 | * 69 | * 70 | * @param value the new value of the 'Variable Value' attribute. 71 | * @see roboML.RMLObject 72 | * @see #getVariableValue() 73 | * @generated 74 | */ 75 | void setVariableValue(RMLObject value); 76 | 77 | /** 78 | * Returns the value of the 'Variableref' containment reference list. 79 | * The list contents are of type {@link roboML.VariableRef}. 80 | * 81 | * 82 | * @return the value of the 'Variableref' containment reference list. 83 | * @see roboML.RoboMLPackage#getVariable_Variableref() 84 | * @model containment="true" 85 | * @generated 86 | */ 87 | EList getVariableref(); 88 | 89 | } // Variable 90 | -------------------------------------------------------------------------------- /src-gen/roboML/Condition.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | import org.eclipse.emf.common.util.EList; 6 | 7 | /** 8 | * 9 | * A representation of the model object 'Condition'. 10 | * 11 | * 12 | *

13 | * The following features are supported: 14 | *

15 | *
    16 | *
  • {@link roboML.Condition#getStatementIf Statement If}
  • 17 | *
  • {@link roboML.Condition#getStatementElse Statement Else}
  • 18 | *
  • {@link roboML.Condition#getVariable Variable}
  • 19 | *
  • {@link roboML.Condition#getBooleanExpression Boolean Expression}
  • 20 | *
21 | * 22 | * @see roboML.RoboMLPackage#getCondition() 23 | * @model 24 | * @generated 25 | */ 26 | public interface Condition extends Statement { 27 | /** 28 | * Returns the value of the 'Statement If' containment reference list. 29 | * The list contents are of type {@link roboML.Statement}. 30 | * 31 | * 32 | * @return the value of the 'Statement If' containment reference list. 33 | * @see roboML.RoboMLPackage#getCondition_StatementIf() 34 | * @model containment="true" 35 | * @generated 36 | */ 37 | EList getStatementIf(); 38 | 39 | /** 40 | * Returns the value of the 'Statement Else' containment reference list. 41 | * The list contents are of type {@link roboML.Statement}. 42 | * 43 | * 44 | * @return the value of the 'Statement Else' containment reference list. 45 | * @see roboML.RoboMLPackage#getCondition_StatementElse() 46 | * @model containment="true" 47 | * @generated 48 | */ 49 | EList getStatementElse(); 50 | 51 | /** 52 | * Returns the value of the 'Variable' containment reference list. 53 | * The list contents are of type {@link roboML.Variable}. 54 | * 55 | * 56 | * @return the value of the 'Variable' containment reference list. 57 | * @see roboML.RoboMLPackage#getCondition_Variable() 58 | * @model containment="true" 59 | * @generated 60 | */ 61 | EList getVariable(); 62 | 63 | /** 64 | * Returns the value of the 'Boolean Expression' reference. 65 | * 66 | * 67 | * @return the value of the 'Boolean Expression' reference. 68 | * @see #setBooleanExpression(Entity) 69 | * @see roboML.RoboMLPackage#getCondition_BooleanExpression() 70 | * @model 71 | * @generated 72 | */ 73 | Entity getBooleanExpression(); 74 | 75 | /** 76 | * Sets the value of the '{@link roboML.Condition#getBooleanExpression Boolean Expression}' reference. 77 | * 78 | * 79 | * @param value the new value of the 'Boolean Expression' reference. 80 | * @see #getBooleanExpression() 81 | * @generated 82 | */ 83 | void setBooleanExpression(Entity value); 84 | 85 | } // Condition 86 | -------------------------------------------------------------------------------- /langium/Robot_ML/src/language/semantics/compiler/ArduinoExample/lib/MotorWheel/Omni3WD.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* 4 | wheelLeft wheelRight 5 | // \\ 6 | 7 | 8 | 9 | == 10 | wheelBack 11 | */ 12 | 13 | #ifndef Omni3WD_H 14 | #define Omni3WD_H 15 | 16 | class Omni3WD { 17 | public: 18 | Omni3WD(MotorWheel* wheelBack,MotorWheel* wheelRight,MotorWheel* wheelLeft); 19 | unsigned char switchMotorsLeft(); 20 | unsigned char switchMotorsRight(); 21 | unsigned char switchMotorsReset(); 22 | 23 | unsigned int setMotorAll(unsigned int speedMMPS=0,bool dir=DIR_ADVANCE); 24 | unsigned int setMotorAllStop(); 25 | unsigned int setMotorAllAdvance(unsigned int speedMMPS=0); 26 | unsigned int setMotorAllBackoff(unsigned int speedMMPS=0); 27 | unsigned int setCarStop(); 28 | unsigned int setCarAdvance(unsigned int speedMMPS=0); 29 | unsigned int setCarBackoff(unsigned int speedMMPS=0); 30 | unsigned int setCarLeft(unsigned int speedMMPS=0); 31 | unsigned int setCarRight(unsigned int speedMMPS=0); 32 | unsigned int setCarRotateLeft(unsigned int speedMMPS=0); 33 | unsigned int setCarRotateRight(unsigned int speedMMPS=0); 34 | 35 | unsigned int getCarSpeedMMPS() const; 36 | unsigned int setCarSpeedMMPS(unsigned int speedMMPS=0,unsigned int ms=1000); 37 | unsigned int setCarSlow2Stop(unsigned int ms=1000); 38 | 39 | unsigned int wheelBackSetSpeedMMPS(unsigned int speedMMPS=0,bool dir=DIR_ADVANCE); 40 | //unsigned int wheelBackGetSpeedMMPS() const; 41 | int wheelBackGetSpeedMMPS() const; 42 | unsigned int wheelRightSetSpeedMMPS(unsigned int speedMMPS=0,bool dir=DIR_ADVANCE); 43 | //unsigned int wheelRightGetSpeedMMPS() const; 44 | int wheelRightGetSpeedMMPS() const; 45 | unsigned int wheelLeftSetSpeedMMPS(unsigned int speedMMPS=0,bool dir=DIR_ADVANCE); 46 | //unsigned int wheelLeftGetSpeedMMPS() const; 47 | int wheelLeftGetSpeedMMPS() const; 48 | bool PIDEnable(float kc=KC,float taui=TAUI,float taud=TAUD,unsigned int interval=1000); 49 | bool PIDRegulate(); 50 | void delayMS(unsigned int ms=100, bool debug=false); 51 | void demoActions(unsigned int speedMMPS=100,unsigned int duration=5000, 52 | unsigned int uptime=500,bool debug=false); 53 | void demoActions_Orginal(unsigned int speedMMPS = 20,unsigned int ms = 5000,bool debug = false) ; 54 | void debugger(bool wheelBackDebug=true,bool wheelRightDebug=true,bool wheelLeftDebug=true) const; 55 | 56 | enum {STAT_UNKNOWN, 57 | STAT_STOP, 58 | STAT_ADVANCE, 59 | STAT_BACKOFF, 60 | STAT_LEFT, 61 | STAT_RIGHT, 62 | STAT_ROTATELEFT, 63 | STAT_ROTATERIGHT, 64 | }; 65 | unsigned char getCarStat() const; 66 | 67 | enum { 68 | MOTORS_BRL, 69 | MOTORS_LBR, 70 | MOTORS_RLB, 71 | }; 72 | unsigned char getSwitchMotorsStat() const; 73 | 74 | private: 75 | MotorWheel* _wheelBack; 76 | MotorWheel* _wheelRight; 77 | MotorWheel* _wheelLeft; 78 | 79 | unsigned char _carStat; 80 | unsigned char setCarStat(unsigned char stat); 81 | 82 | unsigned char _switchMotorsStat; 83 | unsigned char setSwitchMotorsStat(unsigned char switchMotorsStat); 84 | 85 | Omni3WD(); 86 | 87 | }; 88 | 89 | #endif 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /src-gen/roboML/Deplacement.java: -------------------------------------------------------------------------------- 1 | /** 2 | */ 3 | package roboML; 4 | 5 | /** 6 | * 7 | * A representation of the model object 'Deplacement'. 8 | * 9 | * 10 | *

11 | * The following features are supported: 12 | *

13 | *
    14 | *
  • {@link roboML.Deplacement#getUnit Unit}
  • 15 | *
  • {@link roboML.Deplacement#getDeplacementDistance Deplacement Distance}
  • 16 | *
  • {@link roboML.Deplacement#getMovementType Movement Type}
  • 17 | *
18 | * 19 | * @see roboML.RoboMLPackage#getDeplacement() 20 | * @model 21 | * @generated 22 | */ 23 | public interface Deplacement extends Statement { 24 | /** 25 | * Returns the value of the 'Unit' reference. 26 | * 27 | * 28 | * @return the value of the 'Unit' reference. 29 | * @see #setUnit(Unit) 30 | * @see roboML.RoboMLPackage#getDeplacement_Unit() 31 | * @model required="true" 32 | * @generated 33 | */ 34 | Unit getUnit(); 35 | 36 | /** 37 | * Sets the value of the '{@link roboML.Deplacement#getUnit Unit}' reference. 38 | * 39 | * 40 | * @param value the new value of the 'Unit' reference. 41 | * @see #getUnit() 42 | * @generated 43 | */ 44 | void setUnit(Unit value); 45 | 46 | /** 47 | * Returns the value of the 'Deplacement Distance' reference. 48 | * 49 | * 50 | * @return the value of the 'Deplacement Distance' reference. 51 | * @see #setDeplacementDistance(Entity) 52 | * @see roboML.RoboMLPackage#getDeplacement_DeplacementDistance() 53 | * @model 54 | * @generated 55 | */ 56 | Entity getDeplacementDistance(); 57 | 58 | /** 59 | * Sets the value of the '{@link roboML.Deplacement#getDeplacementDistance Deplacement Distance}' reference. 60 | * 61 | * 62 | * @param value the new value of the 'Deplacement Distance' reference. 63 | * @see #getDeplacementDistance() 64 | * @generated 65 | */ 66 | void setDeplacementDistance(Entity value); 67 | 68 | /** 69 | * Returns the value of the 'Movement Type' attribute. 70 | * The literals are from the enumeration {@link roboML.Direction}. 71 | * 72 | * 73 | * @return the value of the 'Movement Type' attribute. 74 | * @see roboML.Direction 75 | * @see #setMovementType(Direction) 76 | * @see roboML.RoboMLPackage#getDeplacement_MovementType() 77 | * @model 78 | * @generated 79 | */ 80 | Direction getMovementType(); 81 | 82 | /** 83 | * Sets the value of the '{@link roboML.Deplacement#getMovementType Movement Type}' attribute. 84 | * 85 | * 86 | * @param value the new value of the 'Movement Type' attribute. 87 | * @see roboML.Direction 88 | * @see #getMovementType() 89 | * @generated 90 | */ 91 | void setMovementType(Direction value); 92 | 93 | } // Deplacement 94 | --------------------------------------------------------------------------------