IntelliSense Implementation of a Dynamic Language
Implementace IntelliSense pro dynamický jazyk
rigorous thesis (RECOGNIZED)
View/ Open
Permanent link
http://hdl.handle.net/20.500.11956/94052Identifiers
Study Information System: 196610
Collections
- Kvalifikační práce [11242]
Author
Advisor
Faculty / Institute
Faculty of Mathematics and Physics
Discipline
Software Systems
Department
Department of Software Engineering
Date of defense
6. 12. 2017
Publisher
Univerzita Karlova, Matematicko-fyzikální fakultaLanguage
English
Grade
Recognized
Keywords (Czech)
IntelliSense, PHP, dynamické jazyky, Phalanger, Analýza kódu, Abstraktní Syntaktický stromKeywords (English)
IntelliSense, PHP, dynamic language, Phalanger, Code Analysis, Abstract Syntax TreeVývojáři během samotného programování často opakují stejná slova a stále opisují běžné výrazy. Dále také prohledávají dokumentace a zdrojové kódy, například kvůli znění deklarací metod a jiných symbolů. Z tohoto pohledu je velmi užitečná asistence ze strany vývojového prostředí. Konkrétně metody IntelliSense značně usnadňují práci tím, že shromažďují informace o používaných symbolech a programátorovi je automaticky nabízejí. Během práce s dynamickými jazyky je ale tato pomoc velmi problematická, jelikož sémantika jednotlivých symbolů není definitivně známa, dokud program není spuštěn. Součásti projektu Phalanger tak byli implementovány metody pro syntaktickou, ale také sémantickou analýzu zdrojového kódu, zaměřené hlavně na dynamický jazyk PHP. Je tak možné sestavit seznam slov, které je možné zapsat na určité místo ve zdrojovém kódu; jako jsou klíčová slova jazyka, deklarované symboly či parametry funkce, včetně informací o nich.
In the context of computer programming, the importance of computer assistance is being understood by many developer communities. Developers are e.g. using the same well known expressions or searching method signatures in library documentations. Code sense or IntelliSense methods make most of these actions unnecessary because they serve the available useful information directly to the programmer in a completely automated way. Recently, with the increased focus of the industry on dynamic languages a problem emerges - the complete knowledge on the source code is postponed until the runtime, since there may be ambiguous semantics in the code fragment. As a part of the Phalanger project the methods for syntax and semantic analysis of the dynamic code were designed, especially targeted for the PHP programming language. These methods produce a list of valid possibilities which can be then used on a specified position in the source code; such as declarations, variables and function parameters. This collected information can be also used to a fine-grained syntax highlighting.