Filters








576 Hits in 7.1 sec

Abstract Parsing: Static Analysis of Dynamically Generated String Output Using LR-Parsing Technology [chapter]

Kyung-Goo Doh, Hyunha Kim, David A. Schmidt
2009 Lecture Notes in Computer Science  
We combine LR(k)-parsing technology and data-flow analysis to analyze, in advance of execution, the documents generated dynamically by a program.  ...  The technique is implemented in Objective Caml and has statically validated a suite of PHP programs that dynamically generate HTML documents.  ...  This talk is saved at www.cis.ksu.edu/∼schmidt/papers/hometalks.html The paper was published at the 2009 Static Analysis Symposium (Springer LNCS 5673).  ... 
doi:10.1007/978-3-642-03237-0_18 fatcat:qrhpbitisbhxzp4o3ueazthliu

Abstract LR-Parsing [chapter]

Kyung-Goo Doh, Hyunha Kim, David A. Schmidt
2011 Lecture Notes in Computer Science  
We explain and illustrate abstract parsing, a static-analysis technique based on abstract interpretation, LR-parsing, and partial evaluation for validating PHP-like scripts that generate HTML/XML-style  ...  In this way, abstract parsing resembles compiler data-type checking: a validated script will "not go wrong" and output a malformed, dynamically generated document.  ...  Acknowledgements: We thank Carolyn Talcott for her decades of leadership in programming-languages research and dedicate this paper to her on the occasion of her 60th birthday.  ... 
doi:10.1007/978-3-642-24933-4_6 fatcat:3h6diei3kvc4he63qthevr4iom

Static Validation of Dynamically Generated HTML Documents Based on Abstract Parsing and Semantic Processing [chapter]

Hyunha Kim, Kyung-Goo Doh, David A. Schmidt
2013 Lecture Notes in Computer Science  
parsing is a static-analysis technique for a program that, given a reference LR(k) context-free grammar, statically checks whether or not every dynamically generated string output by the program conforms  ...  In this paper, we extend abstract parsing to do semantic-attribute processing and apply this extension to statically verify that HTML documents generated by JSP or PHP are always valid according to the  ...  We present abstract parsing with an example: Say that a script must generate an output string that conforms to this grammar, S → [] | [ S ] | S S where S is the only nonterminal.  ... 
doi:10.1007/978-3-642-38856-9_12 fatcat:mwqho7ntgbcjfbf2ndykhg7avq

Parsing of Context-Free Languages [chapter]

Klaas Sikkel, Anton Nijholt
1997 Handbook of Formal Languages  
Special superclasses of the context-free grammars have been introduced in order to allow use of variants of e cient parsing methods that had been developed for context-free grammars.  ...  Both in Computer Science and in Computational Linguistics, context-free grammars and associated parsing algorithms are among the most useful tools. Numerous parsing algorithms have been developed.  ...  It is exactly this di erence that is expressed on a higher level of abstraction. Note that every static lter is also a dynamic lter.  ... 
doi:10.1007/978-3-662-07675-0_2 fatcat:rlupjz2uynfavcyr5d7qpbcm3y

The Grammar Tool Box: A Case Study Comparing GLR Parsing Algorithms

Adrian Johnstone, Elizabeth Scott, Giorgios Economopoulos
2004 Electronical Notes in Theoretical Computer Science  
We illustrate the use of the toolset in the construction of a comparative study of three variants of the Tomita-style GLR parsing algorithm running on LR(0), SLR(1) and LR(1) tables for ANSI-C, ISO-Pascal  ...  and IBM VS-COBOL, and give results showing the size of the structures constructed by these parsers and the amount of searching required during the parse, which abstracts their runtime.  ...  As an aid to algorithm analysis and grammar debugging we provide graphical representations of some structures. Static structures are displayed using VCG.  ... 
doi:10.1016/j.entcs.2004.06.008 fatcat:q4seiunzfvfkja5z5r77cnquvq

Learning Lenient Parsing Typing via Indirect Supervision [article]

Toufique Ahmed, Premkumar Devanbu, Vincent Hellendoorn
2021 arXiv   pre-print
Using GitHub data, we first create a large dataset of fragments of code and corresponding tree fragments and type annotations; we then randomly corrupt the input fragments by seeding errors that mimic  ...  In either case, the developer experience could be greatly improved if such code could somehow be parsed & typed; this makes such code more amenable to use within IDEs and allows early detection and repair  ...  We use a parsing-astranslation approach, based on the state-of-the-art Transformer model, while using a tagging approach for typing.  ... 
arXiv:1910.05879v3 fatcat:dkdofygmg5boxfffldahiihwwi

Parse Forest Diagnostics with Dr. Ambiguity [chapter]

Hendrikus J. S. Basten, Jurgen J. Vinju
2012 Lecture Notes in Computer Science  
In this paper we propose and evaluate a method for locating causes of ambiguity in context-free grammars by automatic analysis of parse forests.  ...  A parse forest is the set of parse trees of an ambiguous sentence.  ...  We have evaluated our prototype implementation on an actively used and mature grammar for Java 5, to show that DR. AMBIGUITY can indeed propose the proper disambiguations.  ... 
doi:10.1007/978-3-642-28830-2_16 fatcat:m5hzy5amljgdfktgtkma7tyrgq

Variability-aware parsing in the presence of lexical macros and conditional compilation

Christian Kästner, Paolo G. Giarrusso, Tillmann Rendel, Sebastian Erdweg, Klaus Ostermann, Thorsten Berger
2011 SIGPLAN notices  
However, current parsing solutions use unsound heuristics, support only a subset of the language, or suffer from exponential explosion.  ...  In many projects, lexical preprocessors are used to manage different variants of the project (using conditional compilation) and to define compile-time code transformations (using macros).  ...  However, we exclude this aspect from discussions within this paper, because we believe that other parsing technologies could be used as well (e.g., packrat parsing [21] , LR parsing [25] , GLR parsing  ... 
doi:10.1145/2076021.2048128 fatcat:wokacq5qm5gh3nnka5etumneoq

Variability-aware parsing in the presence of lexical macros and conditional compilation

Christian Kästner, Paolo G. Giarrusso, Tillmann Rendel, Sebastian Erdweg, Klaus Ostermann, Thorsten Berger
2011 Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications - OOPSLA '11  
However, current parsing solutions use unsound heuristics, support only a subset of the language, or suffer from exponential explosion.  ...  In many projects, lexical preprocessors are used to manage different variants of the project (using conditional compilation) and to define compile-time code transformations (using macros).  ...  However, we exclude this aspect from discussions within this paper, because we believe that other parsing technologies could be used as well (e.g., packrat parsing [21] , LR parsing [25] , GLR parsing  ... 
doi:10.1145/2048066.2048128 dblp:conf/oopsla/KastnerGREOB11 fatcat:i46w4vshzzhtnolknggc2ytida

Preventing injection attacks with syntax embeddings

Martin Bravenboer, Eelco Dolstra, Eelco Visser
2010 Science of Computer Programming  
This is almost always done using unhygienic string manipulation, the concatenation of constants and clientsupplied strings.  ...  This approach is generic, meaning that it can be applied with relative ease to any combination of context-free host and guest languages.  ...  We thank the anonymous reviewers of GPCE 2007 for providing useful feedback.  ... 
doi:10.1016/j.scico.2009.05.004 fatcat:fcn3mbcqpvastavmsk37ifxlf4

Preventing injection attacks with syntax embeddings

Martin Bravenboer, Eelco Dolstra, Eelco Visser
2007 Proceedings of the 6th international conference on Generative programming and component engineering - GPCE '07  
This is almost always done using unhygienic string manipulation, the concatenation of constants and client-supplied strings.  ...  This approach is generic, meaning that it can be applied with relative ease to any combination of host and guest languages.  ...  We thank the anonymous reviewers of GPCE'07 for providing useful feedback.  ... 
doi:10.1145/1289971.1289975 dblp:conf/gpce/BravenboerDV07 fatcat:a3ofdp6om5bjjfizmd6cqphck4

Dual syntax for XML languages

Claus Brabrand, Anders Møller, Michael I. Schwartzbach
2008 Information Systems  
XSLT stylesheets are often used to convert from the XML syntax to the alternative syntax; however, such transformations are not reversible since no general tool exists to automatically parse the alternative  ...  Moreover, the tool statically checks that the transformations are reversible and that all XML documents generated from the alternative syntax are valid according to a given XML schema.  ...  Moreover, we have presented techniques for statically checking reversibility of an XSugar specification and validity of the output in the direction that generates XML.  ... 
doi:10.1016/j.is.2008.01.006 fatcat:yhcuhfposnds7bdy4yfuc35sia

Dual Syntax for XML Languages [chapter]

Claus Brabrand, Anders Møller, Michael I. Schwartzbach
2005 Lecture Notes in Computer Science  
XSLT stylesheets are often used to convert from the XML syntax to the alternative syntax; however, such transformations are not reversible since no general tool exists to automatically parse the alternative  ...  Moreover, the tool statically checks that the transformations are reversible and that all XML documents generated from the alternative syntax are valid according to a given XML schema.  ...  Moreover, we have presented techniques for statically checking reversibility of an XSugar specification and validity of the output in the direction that generates XML.  ... 
doi:10.1007/11601524_2 fatcat:q64tvlql2zgk7frhzbrnvkknhy

Exploiting XPG for Visual Languages Definition, Analysis and Development

G. Costagliola, V. Deufemia, F. Ferrucci, C. Gravino
2003 Electronical Notes in Theoretical Computer Science  
As a matter of fact, an efficient syntactic analysis of visual languages can be effectively perfomed by using a suitable extension of LR techniques.  ...  Moreover, syntax-direct translations can be used to verify properties of visual sentences during a semantic analysis phase.  ...  As an example, properties of visual languages could be verified during a static semantic analysis which could be carried out by exploiting the syntax structure given in output by the parsing alghoritm.  ... 
doi:10.1016/s1571-0661(05)82631-3 fatcat:fuixek47bbafroptmuwe7quu3a

Morbig: a static parser for POSIX shell

Yann Régis-Gianas, Nicolas Jeannerod, Ralf Treinen
2018 Proceedings of the 11th ACM SIGPLAN International Conference on Software Language Engineering - SLE 2018  
The POSIX shell language defies conventional wisdom of compiler construction on several levels: The shell language was not designed for static parsing, but with an intertwining of syntactic analysis and  ...  parsing) while keeping the implementation at a sufficiently high level of abstraction so that experts can check that the POSIX standard is respected.  ...  Acknowledgment We are grateful to the reviewers of the different versions of this paper. Their comments helped us to improve the paper as well as the implementation.  ... 
doi:10.1145/3276604.3276615 dblp:conf/sle/Regis-GianasJT18 fatcat:n6mgvlrakjeeta4mbtbv2u5vmi
« Previous Showing results 1 — 15 out of 576 results