Roboconf DSL Advanced Software Engineering

A software employing Domain-Specific Language (DSL) for Roboconf architecture

  1. Mohammad Shaker
    A software employing Domain-Specific Language (DSL) for Roboconf architecture
    Transcript Header:
    Roboconf DSL Advanced Software Engineering
    Transcript Body:
    • 1. Domainmodel: (elements+= (Component | Facet | InstanceOf | ServiceECA ))* ;
    • 2. Domainmodel: (elements+= (Component | Facet | InstanceOf | ServiceECA ))* ; Component: COMMENT* name = ID '{' EOL+ (COMMENT* (installer += InstallerComp | alias += AliasComp | icon += IconComp|exports += ExportComp|imports += ImportComp|children += ChildrenComp | facets += FacetChild))* '}' EOL+ ;
    • 3. Domainmodel: (elements+= (Component | Facet | InstanceOf | ServiceECA ))* ; Component: COMMENT* name = ID '{' EOL+ (COMMENT* (installer += InstallerComp | alias += AliasComp | icon += IconComp|exports += ExportComp|imports += ImportComp|children += ChildrenComp | facets += FacetChild))* '}' EOL+ ;
    • 4. Domainmodel: (elements+= (Component | Facet | InstanceOf | ServiceECA ))* ; Facet: COMMENT* 'facet' ':' name = ID '{' EOL+ (COMMENT* (installer += InstallerComp | icon += IconComp|exports += ExportComp| children += ChildrenComp | extends += ExtendComp))* '}' EOL+ ;
    • 5. Domainmodel: (elements+= (Component | Facet | InstanceOf | ServiceECA ))* ; InstanceOf: COMMENT* 'instanceof' ':' name = [Component] '{' EOL+ ( instanceOfs += InstanceOf | (COMMENT* (nameChild += NameChildComp | count += CountComp|channel += ChannelComp| instanceData += InstanceDataComp | instanceState+= InstanceStateComp)))* '}' EOL+ ;
    • 6. • checkMandatoryFields • checkRedifinitionFields • checkComponentNotChildOfSelf • checkUniqueNaming • checkImportVariableCompatibleWithComponentType and more..
    • 7. • checkComponentNotChildOfSelf for (childComponent : childComp.childs) { if (childComponent.name == parentComponentName) { error("A component can't be child of self"); return; } } Apache0{ //… } Apache0{ //… children:Apache0; }
    • 8. • checkUniqueNaming exportComp.exports.forEach [ str | if (exportComp.exports.filter[item|item.equals(str)].size > 1) error("Redifinition of variables in exports."); ]; Apache0{ //… exports: ip1; } Apache0{ //… exports: ip1, ip2, ip1; }
    • 9. • checkImportVariableCompatibleWithComponentType for (var i = 0; i < comps.size; i++) { for (export : comps.get(i).exports.get(0).exports) { if (export == import) { componentFound = true; } } } Tomcat{ //… imports:Apache0.foo; } Apache0{ //… exports:ip,port; }
    • 10. • checkImportVariableCompatibleWithComponentType for (var i = 0; i < comps.size; i++) { for (export : comps.get(i).exports.get(0).exports) { if (export == import) { componentFound = true; } } } Tomcat{ //… imports:Apache0.foo; } Tomcat{ //… imports:Apache0.port; } Apache0{ //… exports:ip,port; }
    • 11. facet:f2{ //… exports: foo=50; } Apache0{ //… exports:ip,port; facets: f2; } Tomcat{ //… imports:Apache0.foo; }
    • 12. facet:f2{ //… exports: foo=50; } Apache0{ //… exports:ip,port; facets: f2; } Tomcat{ //… imports:Apache0.foo; }
    • 13. ServiceECA: COMMENT* 'serviceECA' '{' EOL+ (COMMENT* ( serviceECANameComp += ServiceECANameComp |numInstancesComp += NumInstancesComp | minAllowedInstancesComp += MinAllowedInstancesComp | maxAllowedInstancesComp += MaxAllowedInstancesComp | scaleCooldownInSec += ScaleCooldownInSec | samplingPeriodInSec+= SamplingPeriodInSec ))* scalingRule = ScalingRule '}' EOL+ ;
    • 14. ScalingRule: COMMENT* 'scalingRule' '{' EOL+ 'serviceStats' '{' EOL+ (COMMENT* (serviceECANameComp += ServiceECANameComp | metric += MetricComp | movingTimeRangeInSec += MovingTimeRangeInSecComp))* '}' EOL+ 'highThreshold' '{' EOL+ (COMMENT* (hTValueComp += HTValueComp | hTInstancesIncrease += HTInstancesIncrease))* '}' EOL+ 'lowThreshold' '{' EOL+ (COMMENT* (lTValueComp += LTValueComp | hTInstancesDecrease += HTInstancesDecrease))* '}' EOL+ '}' EOL+ ;
    View More