diff --git a/CompilerGeneration.jrag b/CompilerGeneration.jrag index 1e4f9193e8bdd3e6e2a0fdd97688ecbd0f1fe18c..df7594af7edc1a5db643a17da55a3f0cfa2e768d 100644 --- a/CompilerGeneration.jrag +++ b/CompilerGeneration.jrag @@ -135,12 +135,16 @@ aspect JavaCCGen { } void OwlClassDecl.genJavaCCGrammar(PrintStream pStream) { - pStream.println("void "+getId()+" : {}"); + pStream.println("void "+getId()+"() : {}"); pStream.println("{"); if (getId().equals("Device")) { pStream.print("\"<\" <DEVICE> \">\""); - pStream.print("Property()* Skill()* MainFunction() #"); - pStream.println("Device(3)"); + pStream.print("(Property())* (Skill())* MainFunction() #"); + pStream.println("Device("+getNumRestriction()+")"); + } else { + pStream.print(" <"+getId().toUpperCase()+"> \">\""); + pStream.print("(Property())* (Skill())* MainFunction() #"); + pStream.println(getId()+"("+getNumRestriction()+")"); } pStream.println("}"); } diff --git a/JavaCCChunks.jrag b/JavaCCChunks.jrag index 9579c2a415a500924d6b2b0c5e435ad7569aa924..41a7ff7f2703e761460930a1116d3bf696d9a806 100644 --- a/JavaCCChunks.jrag +++ b/JavaCCChunks.jrag @@ -13,7 +13,7 @@ aspect JavaCCChunks { pStream.println("} "); pStream.println(); pStream.println("PARSER_BEGIN(SiarasParser)"); - pStream.println(" package siaras.AST;"); + pStream.println(" package AST;"); pStream.println(" public class SiarasParser {"); pStream.println("}"); pStream.println("PARSER_END(SiarasParser)"); @@ -73,10 +73,10 @@ aspect JavaCCChunks { pStream.println(" |"); pStream.println(" < CHARACTER_LITERAL:"); pStream.println(" \"\'\""); - pStream.println(" ( (~[\"\'\",\"\\\",\"\n\",\"\r\"])"); + pStream.println(" ( (~[\"\'\",\"\\\\\",\"\\n\",\"\\r\"])"); pStream.println(" |"); - pStream.println(" (\"\\\""); - pStream.println(" ( [\"n\",\"t\",\"b\",\"r\",\"f\",\"\\\",\"'\",\"\\\"\"]"); + pStream.println(" (\"\\\\\""); + pStream.println(" ( [\"n\",\"t\",\"b\",\"r\",\"f\",\"\\\\\",\"'\",\"\\\"\"]"); pStream.println(" |"); pStream.println(" [\"0\"-\"7\"] ( [\"0\"-\"7\"] )?"); pStream.println(" |"); @@ -89,10 +89,10 @@ aspect JavaCCChunks { pStream.println(" |"); pStream.println(" < STRING_LITERAL:"); pStream.println(" \"\\\"\""); - pStream.println(" ( (~[\"\\\"\",\"\\\",\"\n\",\"\r\"])"); + pStream.println(" ( (~[\"\\\"\",\"\\\\\",\"\\n\",\"\\r\"])"); pStream.println(" |"); - pStream.println(" (\"\\\""); - pStream.println(" ( [\"n\",\"t\",\"b\",\"r\",\"f\",\"\\\",\"'\",\"\\\"\"]"); + pStream.println(" (\"\\\\\""); + pStream.println(" ( [\"n\",\"t\",\"b\",\"r\",\"f\",\"\\\\\",\"'\",\"\\\"\"]"); pStream.println(" |"); pStream.println(" [\"0\"-\"7\"] ( [\"0\"-\"7\"] )?"); pStream.println(" |"); diff --git a/Types.jrag b/Types.jrag index d209002d04f90e3ecba3cbd4ef605ceb86e84059..aa8379fd58c674580fb4ac48fbdfde57ad569983 100644 --- a/Types.jrag +++ b/Types.jrag @@ -3,142 +3,144 @@ aspect Types { syn lazy OClass OClass.getSuperClass(); eq OwlClassDecl.getSuperClass() { - for (int i=0; i<getNumElement(); i++) { - if (getElement(i) instanceof RdfsSubClassOf) { - RdfsSubClassOf e = (RdfsSubClassOf) getElement(i); - if (e.getElement(0) instanceof OClass) { - return ((OClass) e.getElement(0)).decl(); + for (int i=0; i<getNumElement(); i++) { + if (getElement(i) instanceof RdfsSubClassOf) { + RdfsSubClassOf e = (RdfsSubClassOf) getElement(i); + if (e.getElement(0) instanceof OClass) { + return ((OClass) e.getElement(0)).decl(); + } + } } - } - } - // No super class found, return an owl Thing instead. - return new OwlClassDecl(new List(), new List(), "Thing"); + // No super class found, return an owl Thing instead. + return new OwlClassDecl(new List(), new List(), "Thing"); } eq OwlClassUse.getSuperClass() { - return decl().getSuperClass(); + return decl().getSuperClass(); } syn lazy OwlClassDecl OClass.decl(); eq OwlClassDecl.decl() = this; eq OwlClassUse.decl() { - ComplexElement top = getTopElement(); - for (int i=0; i<top.getNumElement(); i++) { - if (getId().equals(((ComplexElement) top.getElement(i)).getId())) { - return (OwlClassDecl) top.getElement(i); - } - } - // OK, then let's see if this class is declared by w3.org - String id = getId(); - if (id.endsWith("Thing")) { - return new OwlClassDecl(new List(), new List(), "Thing"); - } - // No decl found, so let's return null. Not sure if that's - // that the right thing to do though. - return new OwlClassDecl(new List(), new List(), "_Unknown_"); + ComplexElement top = getTopElement(); + for (int i=0; i<top.getNumElement(); i++) { + if (getId().equals(((ComplexElement) top.getElement(i)).getId())) { + return (OwlClassDecl) top.getElement(i); + } + } + // OK, then let's see if this class is declared by w3.org + String id = getId(); + if (id.endsWith("Thing")) { + return new OwlClassDecl(new List(), new List(), "Thing"); + } + // No decl found, so let's return null. Not sure if that's + // that the right thing to do though. + return new OwlClassDecl(new List(), new List(), "_Unknown_"); } syn lazy Properties OwlClassDecl.getProperties() { - List l = new List(); -// getTopElement().collectProperties(l); - collectProperties(l); - return new Properties(l); -// Properties p = new Properties(); -// for (int i=0; i<l.getNumChild(); i++) { -// OwlProperty op = (OwlProperty) l.getChild(i); -// if (op.domainIncludes(this)) { -// p.addProperty(op); -// } -// } -// return p; + List l = new List(); + // getTopElement().collectProperties(l); + collectProperties(l); + return new Properties(l); + // Properties p = new Properties(); + // for (int i=0; i<l.getNumChild(); i++) { + // OwlProperty op = (OwlProperty) l.getChild(i); + // if (op.domainIncludes(this)) { + // p.addProperty(op); + // } + // } + // return p; } } aspect Restrictions { - Restrictions OwlClassDecl.restrictions; + Restrictions OwlClassDecl.restrictions; - syn lazy Restrictions OwlClassDecl.getRestrictions() { - if (restrictions == null) { - List l = new List(); - collectRestrictions(l); - restrictions = new Restrictions(l); - } - return restrictions; - } + syn lazy Restrictions OwlClassDecl.getRestrictions() { + if (restrictions == null) { + List l = new List(); + collectRestrictions(l); + restrictions = new Restrictions(l); + } + return restrictions; + } - void ASTNode.collectRestrictions(List l) { - for (int i=0; i<getNumChild(); i++) { - getChild(i).collectRestrictions(l); - } - } + void ASTNode.collectRestrictions(List l) { + for (int i=0; i<getNumChild(); i++) { + getChild(i).collectRestrictions(l); + } + } - void OwlRestriction.collectRestrictions(List l) { - l.add(this); - } + void OwlRestriction.collectRestrictions(List l) { + l.add(this); + } + + syn int OwlClassDecl.getNumRestriction() = getRestrictions().getNumOwlRestriction(); } aspect Properties { void ASTNode.collectProperties(List l) { - for (int i=0; i<getNumChild(); i++) { - getChild(i).collectProperties(l); - } + for (int i=0; i<getNumChild(); i++) { + getChild(i).collectProperties(l); + } } void OwlProperty.collectProperties(List l) { - l.add(this); + l.add(this); } boolean ASTNode.domainIncludes(OClass clazz) { - return false; + return false; } boolean OwlObjectProperty.domainIncludes(OClass clazz) { - for (int i=0; i<getNumElement(); i++) { - if (getElement(i) instanceof RdfsDomain) { - return ((RdfsDomain) getElement(i)).domainIncludes(clazz); - } - } - return false; + for (int i=0; i<getNumElement(); i++) { + if (getElement(i) instanceof RdfsDomain) { + return ((RdfsDomain) getElement(i)).domainIncludes(clazz); + } + } + return false; } boolean RdfsDomain.domainIncludes(OClass clazz) { - for (int i=0; i<getNumElement(); i++) { - if (getElement(i).domainIncludes(clazz)) { - return true; - } - } - return false; + for (int i=0; i<getNumElement(); i++) { + if (getElement(i).domainIncludes(clazz)) { + return true; + } + } + return false; } boolean OwlUnionOf.domainIncludes(OClass clazz) { - for (int i=0; i<getNumElement(); i++) { - if (getElement(i).domainIncludes(clazz)) { - return true; - } - } - return false; + for (int i=0; i<getNumElement(); i++) { + if (getElement(i).domainIncludes(clazz)) { + return true; + } + } + return false; } boolean OClass.domainIncludes(OClass clazz) { - if (!getId().equals("_Unknown_")) { - return getId().equals(clazz.getId()); - } - for (int i=0; i<getNumElement(); i++) { - if (getElement(i).domainIncludes(clazz)) { - return true; - } - } - return false; + if (!getId().equals("_Unknown_")) { + return getId().equals(clazz.getId()); + } + for (int i=0; i<getNumElement(); i++) { + if (getElement(i).domainIncludes(clazz)) { + return true; + } + } + return false; } syn lazy RdfsRange Element.range() = null; eq OwlObjectProperty.range() { - for (int i=0; i<getNumElement(); i++) { - if (getElement(i) instanceof RdfsRange) { - return (RdfsRange) getElement(i); - } - } - return null; + for (int i=0; i<getNumElement(); i++) { + if (getElement(i) instanceof RdfsRange) { + return (RdfsRange) getElement(i); + } + } + return null; } } diff --git a/build.xml b/build.xml index 7277ff82a0ad659790b9852185caaf26418cb7de..e3530545917ac5449d117a195af7effa988f5675 100644 --- a/build.xml +++ b/build.xml @@ -27,7 +27,7 @@ <!-- compile sources --> <target name="build" depends="gen"> - <javac compiler="jikes" debug="true" nowarn="true" srcdir="." includes="**/*.java" excludes="tools/**" classpath=".:${tools}/beaver-rt.jar:${tools}/junit.jar"/> + <javac compiler="jikes" debug="true" nowarn="true" srcdir="." includes="**/*.java" excludes="tools/** siaras/**" classpath=".:${tools}/beaver-rt.jar:${tools}/junit.jar"/> </target> <!-- generate compiler source files --> diff --git a/siaras/Siaras.ast b/siaras/Siaras.ast new file mode 100644 index 0000000000000000000000000000000000000000..d58faa3088659dd6cd7585f59e97c3bd924ce521 --- /dev/null +++ b/siaras/Siaras.ast @@ -0,0 +1,41 @@ +Start ::= Device*; +abstract Thing ::=; +Displace : Move ::=; +Turn : Move ::=; +Move : ManipulationAndHandlingFunction ::=; +MagnetGripper : Gripper ::=; +Orient : Move ::=; +ParallelGripper : PincerGripper ::=; +Arrange : Move ::=; +Feed : Move ::=; +Gripper : ManipulationAndHandling ::=; +StorePartlyOrdered : Store ::=; +ManipulationAndHandlingFunction : MainFunction ::=; +Manufacturing : Device ::=; +Store : ManipulationAndHandlingFunction ::=; +Task : Thing ::=; +MainFunction : Skill ::=; +JointFingerGripper : FingerGripper ::=; +LineParallelGripper : ParallelGripper ::=; +Pass : Move ::=; +Pan : Move ::=; +PincerGripper : Gripper ::=; +ID : Property ::=; +CircularParallelGripper : ParallelGripper ::=; +Assembly : Device ::=; +StoreUnOrdered : Store ::=; +AdditionalFunction : Skill ::=; +Convey : Move ::=; +Device : Thing ::= property:Property* skill:Skill* mainFunction:MainFunction; +FingerGripper : Gripper ::=; +StoreInOrder : Store ::=; +GeneralParallelGripper : ParallelGripper ::=; +Property : Thing ::=; +AngleGripper : PincerGripper ::=; +ManipulationAndHandling : Device ::=; +VacuumGripper : Gripper ::=; +Cost : Property ::=; +IntelligentRobot : Thing ::=; +ElasticFingerGripper : FingerGripper ::=; +Position : Move ::=; +Skill : Thing ::= device:Device*; diff --git a/siaras/Siaras.jjt b/siaras/Siaras.jjt new file mode 100644 index 0000000000000000000000000000000000000000..0c47f93c66043ec18a6a27e7b80ffd46d464bd9a --- /dev/null +++ b/siaras/Siaras.jjt @@ -0,0 +1,364 @@ +options { + MULTI = true; + VISITOR = true; + NODE_DEFAULT_VOID = true; + NODE_SCOPE_HOOK = false; + NODE_PREFIX = ""; + JAVA_UNICODE_ESCAPE = true; + STATIC = false; +} + +PARSER_BEGIN(SiarasParser) + package AST; + public class SiarasParser { +} +PARSER_END(SiarasParser) + +//----------------------------------------------// +// LEXICAL TOKENS // +//----------------------------------------------// +<DEFAULT, BOUNDS> SKIP : /* WHITE SPACE */ +{ + " " + | + "\t" + | + "\n" + | + "\r" + | + "\f" +}// WHITE SPACE + +SPECIAL_TOKEN : /* COMMENTS */ +{ + < "<!--" ( ~["-"] | ( "-" ~["-"] ) )* "-->"> + | < "<rdfs:comment" ( ~["<"] | ( "<" ~["/"] ) )* "</rdfs:comment>" > +}// COMMENTS + + +<DEFAULT, BOUNDS> TOKEN : /* RESERVED WORDS */ +{ + <XML : "xml" > + |<DISPLACE : "Displace"> + |<TURN : "Turn"> + |<MOVE : "Move"> + |<MAGNETGRIPPER : "MagnetGripper"> + |<ORIENT : "Orient"> + |<PARALLELGRIPPER : "ParallelGripper"> + |<ARRANGE : "Arrange"> + |<FEED : "Feed"> + |<GRIPPER : "Gripper"> + |<STOREPARTLYORDERED : "StorePartlyOrdered"> + |<MANIPULATIONANDHANDLINGFUNCTION : "ManipulationAndHandlingFunction"> + |<MANUFACTURING : "Manufacturing"> + |<STORE : "Store"> + |<TASK : "Task"> + |<MAINFUNCTION : "MainFunction"> + |<JOINTFINGERGRIPPER : "JointFingerGripper"> + |<LINEPARALLELGRIPPER : "LineParallelGripper"> + |<PASS : "Pass"> + |<PAN : "Pan"> + |<PINCERGRIPPER : "PincerGripper"> + |<ID : "ID"> + |<CIRCULARPARALLELGRIPPER : "CircularParallelGripper"> + |<ASSEMBLY : "Assembly"> + |<STOREUNORDERED : "StoreUnOrdered"> + |<ADDITIONALFUNCTION : "AdditionalFunction"> + |<CONVEY : "Convey"> + |<DEVICE : "Device"> + |<FINGERGRIPPER : "FingerGripper"> + |<STOREINORDER : "StoreInOrder"> + |<GENERALPARALLELGRIPPER : "GeneralParallelGripper"> + |<PROPERTY : "Property"> + |<ANGLEGRIPPER : "AngleGripper"> + |<MANIPULATIONANDHANDLING : "ManipulationAndHandling"> + |<VACUUMGRIPPER : "VacuumGripper"> + |<COST : "Cost"> + |<INTELLIGENTROBOT : "IntelligentRobot"> + |<ELASTICFINGERGRIPPER : "ElasticFingerGripper"> + |<POSITION : "Position"> + |<SKILL : "Skill"> +} + + +<DEFAULT, BOUNDS> TOKEN : /* LITERALS */ +{ + < INTEGER_LITERAL: + <DECIMAL_LITERAL> (["l","L"])? + | + <HEX_LITERAL> (["l","L"])? + | + <OCTAL_LITERAL> (["l","L"])? + > + | + < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* > + | + < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ > + | + < #OCTAL_LITERAL: "0" (["0"-"7"])* > + | + < FLOAT_LITERAL: + (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)? (["f","F","d","D"])? + | + "." (["0"-"9"])+ (<EXPONENT>)? (["f","F","d","D"])? + | + (["0"-"9"])+ <EXPONENT> (["f","F","d","D"])? + | + (["0"-"9"])+ (<EXPONENT>)? ["f","F","d","D"] + > + | + < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ > + | + < CHARACTER_LITERAL: + "'" + ( (~["'","\\","\n","\r"]) + | + ("\\" + ( ["n","t","b","r","f","\\","'","\""] + | + ["0"-"7"] ( ["0"-"7"] )? + | + ["0"-"3"] ["0"-"7"] ["0"-"7"] + ) + ) + ) + "'" + > + | + < STRING_LITERAL: + "\"" + ( (~["\"","\\","\n","\r"]) + | + ("\\" + ( ["n","t","b","r","f","\\","'","\""] + | + ["0"-"7"] ( ["0"-"7"] )? + | + ["0"-"3"] ["0"-"7"] ["0"-"7"] + ) + ) + )* + "\"" + > +}// LITERALS + +<DEFAULT, BOUNDS> TOKEN : /* IDENTIFIERS */ +{ + < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>|"-")* > + | + < #LETTER: + [ + "\u0024", + "\u0041"-"\u005a", + "\u005f", + "\u0061"-"\u007a", + "\u00c0"-"\u00d6", + "\u00d8"-"\u00f6", + "\u00f8"-"\u00ff", + "\u0100"-"\u1fff", + "\u3040"-"\u318f", + "\u3300"-"\u337f", + "\u3400"-"\u3d2d", + "\u4e00"-"\u9fff", + "\uf900"-"\ufaff" + ] + > + | + < #DIGIT: + [ + "\u0030"-"\u0039", + "\u0660"-"\u0669", + "\u06f0"-"\u06f9", + "\u0966"-"\u096f", + "\u09e6"-"\u09ef", + "\u0a66"-"\u0a6f", + "\u0ae6"-"\u0aef", + "\u0b66"-"\u0b6f", + "\u0be7"-"\u0bef", + "\u0c66"-"\u0c6f", + "\u0ce6"-"\u0cef", + "\u0d66"-"\u0d6f", + "\u0e50"-"\u0e59", + "\u0ed0"-"\u0ed9", + "\u1040"-"\u1049" + ] + > +}// IDENTIFIERS + +<DEFAULT,BOUNDS> TOKEN : /* SEPARATORS */ +{ + < LBRACE : "{" > + | < RBRACE : "}" > + | < LBRACKET : "[" > + | < RBRACKET : "]" > + | < SEMICOLON : ";" > +}// SEPARATORS + +<DEFAULT,BOUNDS> TOKEN : /* OPERATORS */ +{ + < ASSIGN : "=" > +}// OPERATORS + +Start Start() #Start : {} +{ + (Device())* + { return jjtThis; } +} + +void Displace() : {} +{ + <DISPLACE> ">"(Property())* (Skill())* MainFunction() #Displace(0) +} +void Turn() : {} +{ + <TURN> ">"(Property())* (Skill())* MainFunction() #Turn(0) +} +void Move() : {} +{ + <MOVE> ">"(Property())* (Skill())* MainFunction() #Move(0) +} +void MagnetGripper() : {} +{ + <MAGNETGRIPPER> ">"(Property())* (Skill())* MainFunction() #MagnetGripper(0) +} +void Orient() : {} +{ + <ORIENT> ">"(Property())* (Skill())* MainFunction() #Orient(0) +} +void ParallelGripper() : {} +{ + <PARALLELGRIPPER> ">"(Property())* (Skill())* MainFunction() #ParallelGripper(0) +} +void Arrange() : {} +{ + <ARRANGE> ">"(Property())* (Skill())* MainFunction() #Arrange(0) +} +void Feed() : {} +{ + <FEED> ">"(Property())* (Skill())* MainFunction() #Feed(0) +} +void Gripper() : {} +{ + <GRIPPER> ">"(Property())* (Skill())* MainFunction() #Gripper(0) +} +void StorePartlyOrdered() : {} +{ + <STOREPARTLYORDERED> ">"(Property())* (Skill())* MainFunction() #StorePartlyOrdered(0) +} +void ManipulationAndHandlingFunction() : {} +{ + <MANIPULATIONANDHANDLINGFUNCTION> ">"(Property())* (Skill())* MainFunction() #ManipulationAndHandlingFunction(0) +} +void Manufacturing() : {} +{ + <MANUFACTURING> ">"(Property())* (Skill())* MainFunction() #Manufacturing(0) +} +void Store() : {} +{ + <STORE> ">"(Property())* (Skill())* MainFunction() #Store(0) +} +void Task() : {} +{ + <TASK> ">"(Property())* (Skill())* MainFunction() #Task(0) +} +void MainFunction() : {} +{ + <MAINFUNCTION> ">"(Property())* (Skill())* MainFunction() #MainFunction(0) +} +void JointFingerGripper() : {} +{ + <JOINTFINGERGRIPPER> ">"(Property())* (Skill())* MainFunction() #JointFingerGripper(0) +} +void LineParallelGripper() : {} +{ + <LINEPARALLELGRIPPER> ">"(Property())* (Skill())* MainFunction() #LineParallelGripper(0) +} +void Pass() : {} +{ + <PASS> ">"(Property())* (Skill())* MainFunction() #Pass(0) +} +void Pan() : {} +{ + <PAN> ">"(Property())* (Skill())* MainFunction() #Pan(0) +} +void PincerGripper() : {} +{ + <PINCERGRIPPER> ">"(Property())* (Skill())* MainFunction() #PincerGripper(0) +} +void ID() : {} +{ + <ID> ">"(Property())* (Skill())* MainFunction() #ID(0) +} +void CircularParallelGripper() : {} +{ + <CIRCULARPARALLELGRIPPER> ">"(Property())* (Skill())* MainFunction() #CircularParallelGripper(0) +} +void Assembly() : {} +{ + <ASSEMBLY> ">"(Property())* (Skill())* MainFunction() #Assembly(0) +} +void StoreUnOrdered() : {} +{ + <STOREUNORDERED> ">"(Property())* (Skill())* MainFunction() #StoreUnOrdered(0) +} +void AdditionalFunction() : {} +{ + <ADDITIONALFUNCTION> ">"(Property())* (Skill())* MainFunction() #AdditionalFunction(0) +} +void Convey() : {} +{ + <CONVEY> ">"(Property())* (Skill())* MainFunction() #Convey(0) +} +void Device() : {} +{ +"<" <DEVICE> ">"(Property())* (Skill())* MainFunction() #Device(3) +} +void FingerGripper() : {} +{ + <FINGERGRIPPER> ">"(Property())* (Skill())* MainFunction() #FingerGripper(0) +} +void StoreInOrder() : {} +{ + <STOREINORDER> ">"(Property())* (Skill())* MainFunction() #StoreInOrder(0) +} +void GeneralParallelGripper() : {} +{ + <GENERALPARALLELGRIPPER> ">"(Property())* (Skill())* MainFunction() #GeneralParallelGripper(0) +} +void Property() : {} +{ + <PROPERTY> ">"(Property())* (Skill())* MainFunction() #Property(0) +} +void AngleGripper() : {} +{ + <ANGLEGRIPPER> ">"(Property())* (Skill())* MainFunction() #AngleGripper(0) +} +void ManipulationAndHandling() : {} +{ + <MANIPULATIONANDHANDLING> ">"(Property())* (Skill())* MainFunction() #ManipulationAndHandling(0) +} +void VacuumGripper() : {} +{ + <VACUUMGRIPPER> ">"(Property())* (Skill())* MainFunction() #VacuumGripper(0) +} +void Cost() : {} +{ + <COST> ">"(Property())* (Skill())* MainFunction() #Cost(0) +} +void IntelligentRobot() : {} +{ + <INTELLIGENTROBOT> ">"(Property())* (Skill())* MainFunction() #IntelligentRobot(0) +} +void ElasticFingerGripper() : {} +{ + <ELASTICFINGERGRIPPER> ">"(Property())* (Skill())* MainFunction() #ElasticFingerGripper(0) +} +void Position() : {} +{ + <POSITION> ">"(Property())* (Skill())* MainFunction() #Position(0) +} +void Skill() : {} +{ + <SKILL> ">"(Property())* (Skill())* MainFunction() #Skill(1) +}