1 / 27

VisualLISA

VisualLISA. Attribute Grammars made easy. Author. Context. Institution. Presentation. University of Minho. UCE-15, Master in Informatics. Nuno Oliveira, nuno43549@gmail.com. The Problem. Conception of a Visual Language ; Development of a Processor for the Language ;

haile
Télécharger la présentation

VisualLISA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. VisualLISA AttributeGrammarsmadeeasy... Author Context Institution Presentation Universityof Minho UCE-15, MasterinInformatics Nuno Oliveira, nuno43549@gmail.com

  2. TheProblem • Conceptionof a Visual Language; • Developmentof a Processor for theLanguage; • Idealizationofthe Visual Language; • Formalizationofthelanguage; • Concretizationoftheinitialidea;

  3. AfterFunnyTimes...

  4. Let’sget to Business! • VisualLISA Analysis • DomainAnalysis • VL Formal Notations • VPE generators • Implementation

  5. VisualLISA Analysis • VisualLISA – a graphicalfront-end for LISA (anAG-basedcompilergenerator); • Visual EditionofAttributeGrammars (production-oriented); • Aimsatreducing mental effortwhenspecifyingAGs; • Performssyntaxandsemanticcheckofthe AG modeldrawn; • Generates code (LISA, XML, BNF) fromthedrawings; • The environment shouldbeautomaticandsystematicallygeneratedresorting to a VPE generator

  6. DomainSpecificProblem • Theknowladgeabout AG wasnotenough; • Decicion: Search for AG domainknowledgeuntiltheendoftheworld; • When I getback: Deepundertstandingabout AG;

  7. VL Formal Notations • Twowerefound: MASOViLAand PLG; • PLG waschosen: • IssimplerthanMASOViLA; • Closer to BNF usual notation; TERMINAL → over ( rectangle, text) TREE_BRANCH → points_from ( points_to (line, ~TERMINAL) , ~LEFT_SYMBOL) | points_from ( points_to ( line, ˜NONTERMINAL) , ~LEFT SYMBOL)

  8. VPE Generators • Several VPE generatorshavebeenstudied: • DEViL • VLDesk • Tiger • ... • DEViL waschosen: • Basedon Modular SymbolOriented AG Specifications; • Generated environment is complete butextensible; • Stand-alone environment for themostimportantSOs; • ...

  9. Implementation • TheDevelopmentProcess • AbstractSyntaxDefinition; • InteractionandLayoutDefinition; • SemanticsVerificationImplementation; • CodeGeneration.

  10. SystematicDevelopment Systematization VisualLISA AbstractSyntax Definition Code Generation TG Semantics Implementation TG module Interaction&Layout Definition TW module TG TG module

  11. Scene 1 • TheDevelopmentProcess • AbstractSyntaxDefinition; • InteractionandLayoutDefinition; • SemanticsVerificationImplementation; • CodeGeneration.

  12. AbstractSyntaxDefinition AbstractSyntax Definition TreeGrammar (TG) Join&Transform PLG TERMINAL → over ( rectangle, text) (…) Structure Definition CLASS Root { name: VAL VLString; semprods: SUB Semprod*; definitions: SUB Definitions!; library: SUB Library?; } ...

  13. SystematicDevelopment (2) Systematization VisualLISA AbstractSyntax Definition Code Generation TG Semantics Implementation TG module Interaction&Layout Definition TW module TG TG module

  14. Scene 2 • TheDevelopmentProcess • AbstractSyntaxDefinition; • InteractionandLayoutDefinition; • SemanticsVerificationImplementation; • CodeGeneration.

  15. Interaction & LayoutDefinition Interaction&Layout Definition TG module Join&Transform Views Definition VIEW rootView ROOT Root { BUTTON IMAGE "img::btnSemprod” INSERTS Semprod INFO "Inserts a newProduction"; } Symbols Definition SYMBOL rootView_Root INHERITS VPRootElement, VPForm COMPUTE SYNT.drawing = ADDROF(rootViewDrawing); END; SYMBOL rootView_Root_semprods INHERITS VPFormElement, VPSimpleList COMPUTE SYNT.formElementName = "productions"; END;

  16. SystematicDevelopment (3) Systematization VisualLISA DEViL AbstractSyntax Definition Code Generation TG Semantics Implementation TG module Interaction&Layout Definition TW module TG TG module

  17. Scene 3 • TheDevelopmentProcess • AbstractSyntaxDefinition; • InteractionandLayoutDefinition; • SemanticsVerificationImplementation; • CodeGeneration.

  18. SemanticsImplementation Semantics Implementation TW TG module TCL_programming Formal Constraints checkutil::addCheckSemprod { setn [llength [c::getList {$obj.grammarElements.CHILDREN[LeftSymbol]}]] setsymbName [c::get {$obj.name.VALUE}] if { $n == 0 } { eturn "Production '$symbName' musthaveoneRootsymbol!” } elseif {$n > 1} { return "Production '$symbName' musthaveonlyoneRootsymbol!” } return ”” } • A productionmusthaveoneandonlyonerootsymbol; • (...) =>

  19. Scene 4 • TheDevelopmentProcess • AbstractSyntaxDefinition; • InteractionandLayoutDefinition; • SemanticsVerificationImplementation; • CodeGeneration.

  20. CodeGeneration CodeGeneration TG module Join&Transform Auxiliary Functions Translation Templates LISA, XAGra, BNF SYMBOL bnfgen_Semprod COMPUTE SYNT.bnfLHS = CONSTITUENTS bnfgen_LeftSymbol.pers_symbolName WITH(PTGNode, PTGNewLineSeq, PTGAsIs, PTGNull); SYNT.bnfRHS = PTGAsIs(VLString(SELECT(vlList( "printBNFOrderedRHSElements",THIS.objId),eval()))); SYNT.bnfCode = PTGbnfProd(THIS.bnfLHS, THIS.bnfRHS); END; bnfProd(lhs, rhs): [lhs] -> [rhs]

  21. SystematicDevelopment (4) Systematization VisualLISA DEViL AbstractSyntax Definition Code Generation TG Semantics Implementation TG module Interaction&Layout Definition TW module TG TG module

  22. Example LISA • GenerationofCodeFromthe AG Drawn • LISA • Generates XAGra XAGra

  23. OneStep More • RequirementsAnalysis • DomainAnalysis • VL Formal Notations • VPE generators • Implementation • Dissemination

  24. Dissemination • Website developed : www.di.uminho.pt/~gepl/VisualLISA • Complete TechnicalReportwritten • Paperssubmited to InternationalConferences • SeveralTalks weregiven.

  25. ConclusionandFutureWork • VisualLISA reallyworks! • The use ofan environment generatorallows a systematicdevelopment; • Maintainingandevolvingthe modules iseasy; • Itlacksanusabilitytest to confirmwhether VisualLISA easesornotthespecificationof AG;

  26. VisualLISA www.di.uminho.pt/~gepl/VisualLISA

More Related