Desenvolvimento De Um Dispensador Automático De Medicamentos

Total Page:16

File Type:pdf, Size:1020Kb

Desenvolvimento De Um Dispensador Automático De Medicamentos Departamento de Engenharia Eletrotécnica Desenvolvimento de um Dispensador Automático de Medicamentos Trabalho de Projeto apresentado para a obtenção do grau de Mestre em Automação e Comunicações em Sistemas de Energia Autor Nelson Miguel Domingues Vinagre Orientadores Doutor Inácio de Sousa Adelino da Fonseca Doutor José Manuel Torres Farinha Instituição Instituto Superior de Engenharia de Coimbra Coimbra, Dezembro, 2013 D ESENVOLVIMENTO DE UM DISPENSADOR AUTOMÁTICO DE MEDICAMENTOS AGRADECIMENTOS Agradecimentos Quero deixar, aqui, expresso o meu reconhecimento: Aos meus orientadores de projeto, professor doutor Inácio Fonseca e professor doutor José Torres Farinha, disponibilidade, persistência, sabedoria e conselhos preciosos e por me encorajar a investigar e nunca desistir. Ao pessoal docente e não docente do Departamento de Engenharia Eletrotécnica pelo apoio e disponibilidade, e em particular ao professor Marco Silva pela ajuda na soldadura das PCI (Placas de Circuito Impresso) e ao Sr. Francisco Dias pela ajuda no fornecimento de material; À restante equipa de trabalho que me acolheram desde o primeiro momento e me impulsionaram para ter hoje este produto; Aos desenvolvedores e contribuidores de projetos com licenças permissivas (de software ou outros conteúdos) que pouparam muitas horas de trabalho neste projeto. Por fim, mas não menos importante quero agradecer à minha família e amigos pelo apoio prestado durante este longo percurso. Nelson Miguel Domingues Vinagre i D ESENVOLVIMENTO DE UM DISPENSADOR AUTOMÁTICO DE MEDICAMENTOS RESUMO Resumo O número de pessoas com idade superior a 65 anos aumentou consideravelmente nos últimos 40 anos. Este incremento da longevidade tem levado ao aparecimento de diversas patologias relacionadas com a idade e ao aumento da prevalência das patologias crónicas. Na grande maioria, esta população idosa é polimedicada, apresentando idades compreendidas entre os 60 e os 90 anos. Tomando como exemplo a Diabetes Mellitus Tipo 2, uma doença crónica onde, maioritariamente, os pacientes são polimedicados e com alguma idade, alguns estudos sugerem que 50% dos doentes não aderem aos regimes medicamentosos e que apenas um terço dos doentes diabéticos têm uma adesão adequada à terapêutica. Ora, a não-adesão à terapêutica, para além de ser um problema significativo para os doentes, uma vez que diminui a eficácia do tratamento e aumenta o risco de desenvolvimento de complicações, aumenta substancialmente os custos humanos, sociais e económicos da doença. O presente projeto de mestrado foi materializado num dispositivo, designado ePillbox, que visou responder aos problemas da polimedicamentação, através de uma solução tecnológica, incorporando as vertentes de controlo e comunicação. Por outras palavras, o presente projeto pretende ser uma solução de engenharia para um problema de saúde que se prevê continuar a agravar-se nos próximos anos. O dispositivo final é encapsulado numa caixa individual com um design inovador, e mais-valias tecnológicas, relativamente aos dispositivos existentes no mercado. Como resultado final, o presente projeto de mestrado inclui não só uma vertente tecnológica, que está subjacente ao presente mestrado, mas também uma vertente de design e de serviço a um público que poderá ver na presente solução um grande valor acrescentado na sua qualidade de vida. Palavras-chave: Dispensador de medicamentos; Medicamentos automáticos; Dispensador individual; Dispensador eletrónico de medicamentos Nelson Miguel Domingues Vinagre iii D ESENVOLVIMENTO DE UM DISPENSADOR AUTOMÁTICO DE MEDICAMENTOS ABSTRACT Abstract The number of people aged over 65 has increased considerably in the last 40 years. This increase in longevity has led to the emergence of various diseases related to age and the increased prevalence of chronic pathologies. The vast majority of the elderly population, with ages between 60 and 90 years, is multi-medicated. For example, in the case of Diabetes Mellitus, some studies suggest that 50% of patients do not adhere to medication regimens and that only one third of them have adequate adhesion to therapy. However, non-adherence to therapy is a significant problem for patients, as it decreases the effectiveness of treatment and increases the risk of developing complications, also increasing the human, social and economic cost of disease. This master’s degree project presents a new device, called ePillbox, with the main object to solve the multi-medication problems, though a technological solution, with control and communications features built-in. In other words, this device aims to be an engineering solution to a health problem that is expected to get worse in the coming years. The final device is packaged in an individual box with innovative design and technological improvements in relation to existing devices in the market. As a final result, this master's project includes not only a technological aspect that underlies this master’s degree, but also an element of design and service to an audience that can see in this solution a great added value in their quality of life . Key-words: Pill dispenser; Automatic pill; Individual dispenser; Electronic pill dispenser. Nelson Miguel Domingues Vinagre v D ESENVOLVIMENTO DE UM DISPENSADOR AUTOMÁTICO DE MEDICAMENTOS ÍNDICE Índice Agradecimentos ......................................................................................................... i Resumo ..................................................................................................................... iii Abstract ...................................................................................................................... v Índice ........................................................................................................................ vii Índice de figuras ....................................................................................................... xi Índice de tabelas ..................................................................................................... xv Abreviaturas .......................................................................................................... xvii Capítulo 1 - Introdução ............................................................................................. 1 1.1 - Motivação e contexto .................................................................................................................. 1 1.2 - O projeto e a equipa .................................................................................................................... 2 1.3 - Objetivos ..................................................................................................................................... 3 1.4 - Organização do documento ........................................................................................................ 3 Capítulo 2 - Estado da Arte ....................................................................................... 5 Capítulo 3 - Arquitetura do sistema ......................................................................... 9 3.1 - Enquadramento ........................................................................................................................... 9 3.2 - Arquitetura do sistema ................................................................................................................ 9 3.3 - Módulos do dispositivo ePillBox ................................................................................................ 11 3.3.1 - Alimentação do sistema ..................................................................................................... 12 3.3.2 - Unidade de processamento ............................................................................................... 12 3.3.3 - Módulos de comunicação .................................................................................................. 13 3.3.3.2 - Wi-Fi /Ethernet ............................................................................................................ 14 3.3.3.3 - Bluetooth ..................................................................................................................... 14 3.3.4 - Interface com o utilizador ................................................................................................... 14 3.3.5 - Interface de potência com os atuadores ............................................................................ 14 3.3.6 - Atuadores ........................................................................................................................... 15 3.3.7 - Tabuleiro de tomas ............................................................................................................ 15 3.4 - Sumário ..................................................................................................................................... 15 Capítulo 4 - Desenvolvimento do hardware .......................................................... 17 4.1 - Enquadramento ......................................................................................................................... 17 4.2 - Módulo de Alimentação ............................................................................................................. 17 4.2.1 - A alimentação externa ....................................................................................................... 18 4.2.2 - Conversor DC-DC .............................................................................................................
Recommended publications
  • Report on Biodiversity and Tropical Forests in Indonesia
    Report on Biodiversity and Tropical Forests in Indonesia Submitted in accordance with Foreign Assistance Act Sections 118/119 February 20, 2004 Prepared for USAID/Indonesia Jl. Medan Merdeka Selatan No. 3-5 Jakarta 10110 Indonesia Prepared by Steve Rhee, M.E.Sc. Darrell Kitchener, Ph.D. Tim Brown, Ph.D. Reed Merrill, M.Sc. Russ Dilts, Ph.D. Stacey Tighe, Ph.D. Table of Contents Table of Contents............................................................................................................................. i List of Tables .................................................................................................................................. v List of Figures............................................................................................................................... vii Acronyms....................................................................................................................................... ix Executive Summary.................................................................................................................... xvii 1. Introduction............................................................................................................................1- 1 2. Legislative and Institutional Structure Affecting Biological Resources...............................2 - 1 2.1 Government of Indonesia................................................................................................2 - 2 2.1.1 Legislative Basis for Protection and Management of Biodiversity and
    [Show full text]
  • Pfc6168.Pdf (438.8Kb)
    ESCUELA TÉCNICA SUPERIOR DE INGENIERÍA DE TELECOMUNICACIÓN UNIVERSIDAD POLITÉCNICA DE CARTAGENA Proyecto Fin de Carrera TÍTULO: Iphone Bookshelf AUTOR: David Zamora Gutiérrez DIRECTOR: Francesc Burrull i Mestres Febrero / 2015 INDEX IPhone application………………………………………………………………... o Tools……………………………………………………………………… . Iphone…………………………………………………………….. Objective-C……………………………………………………….. o Code………………………………………………………………………. Web site…………………………………………………………………………... o Tools……………………………………………………………………… . Codeigniter……………………………………………………….. Php………………………………………………………………... Http……………………………………………………………….. Html………………………………………………………………. Mysql……………………………………………………………... Apache……………………………………………………………. CSS……………………………………………………………….. E-books…………………………………………………………… o Code………………………………………………………………………. References……………………………………………………………………....... IPHONE APPLICATION TOOLS IPHONE The iPhone is a line of Internet- and multimedia-enabled smartphones designed and marketed by Apple Inc. The first iPhone was unveiled by Apple CEO Steve Jobs on January 9, 2007, and released on June 29, 2007. An iPhone can function as a video camera (video recording was not a standard feature until the iPhone 3GS was released), a camera phone, can send texts and receive visual voicemail, a portable media player, and an Internet client with email and web browsing capabilities, and both Wi-Fi and 3G connectivity. The user interface is built around the device's multi-touch screen, including a virtual keyboard rather than a physical one. Third-party as well as Apple application software is available from the App Store, which launched in mid-2008 and now has over 350,000 "apps" approved by Apple. These apps have diverse functionalities, including games, reference, GPS navigation, social networking, e-books... To create applications for this device it’s use the APPLE SDK. APPLE SDK The SDK basically consists of a set of tools that Apple provides to build, debug and test our developments. It contains the following programs: - XCODE: Xcode is a suite of tools, developed by Apple, for developing software for Mac OS X and iOS.
    [Show full text]
  • Phalanger Compiling PHP for .NET and Silverlight
    Phalanger Compiling PHP for .NET and Silverlight http://php-compiler.net Tomáš Petříček, C# MVP ([email protected]) Formerly by: Tomáš Matoušek, Ladislav Prošek, et al. Agenda Phalanger Introduction What is Phalanger? And what is it good for? Phalanger for Silverlight How (and why) to write Silverlight client apps in PHP .NET and PHP interoperability Calling C# code from PHP Calling PHP code from C# Interesting Compilation Problems Conditional type binding Calling overloaded methods DEMO Let’s look at some cool demo first :-)! http://tomasp.net/files/copter/default.html Introduction . Phalanger: PHP Language Compiler for .NET . Initially targeting .NET Framework 1.1 . Now using .NET 2.0, Mono and Silverlight 2.0 . We’re planning to use (parts of) DLR in the future . What can you do with Phalanger? . Compile various open-source PHP applications for .NET . Use PHP functions & objects from (other) .NET languages . Use .NET classes from PHP programs . Write Silverlight applications in PHP Agenda Phalanger Introduction What is Phalanger? And what is it good for? Phalanger for Silverlight How (and why) to write Silverlight client apps in PHP .NET and PHP interoperability Calling C# code from PHP Calling PHP code from C# Interesting Compilation Problems Conditional type binding Calling overloaded methods Phalanger: PHP for Silverlight . Similar as other Silverlight dynamic languages . XAML file is loaded by Silverlight plugin in the browser . PHP source code referenced using XAML element: <php:PhalangerLoader Source="script.phpx" /> . Downloaded, compiled and executed on the client . “Loader” element, compiler and runtime in one DLL file <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:php="clr-namespace:PHP.Silverlight; assembly=Bin/PhpNetCore.dll" Width="800" Height="600" Background="White"> <php:PhalangerLoader Source="simpledemo_php.phpx" /> </Canvas> Phalanger: PHP for Silverlight .
    [Show full text]
  • Les Possibilités De Dispersion Et Éléments D'habitat-Refuge Dans Un
    Les possibilités de dispersion et éléments d’habitat-refuge dans un paysage d’agriculture intensive fragmenté par un réseau routier dense : le cas de la petite faune dans la plaine du Bas-Rhin Jonathan Jumeau To cite this version: Jonathan Jumeau. Les possibilités de dispersion et éléments d’habitat-refuge dans un paysage d’agriculture intensive fragmenté par un réseau routier dense : le cas de la petite faune dans la plaine du Bas-Rhin. Ecosystèmes. Université de Strasbourg, 2017. Français. NNT : 2017STRAJ120. tel-01768001 HAL Id: tel-01768001 https://tel.archives-ouvertes.fr/tel-01768001 Submitted on 16 Apr 2018 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. UNIVERSITÉ DE STRASBOURG ÉCOLE DOCTORALE 414 UMR7178 – UMR6553 THÈSE présentée par : Jonathan JUMEAU soutenue le : 16 octobre 2017 pour obtenir le grade de : Docteur de l’université de Strasbourg Discipline/ Spécialité : Biologie de la conservation Les possibilités de dispersion et éléments d’habitat-refuge dans un paysage d'agriculture intensive fragmenté par un réseau routier dense : le cas de la petite faune dans la plaine du Bas-Rhin THÈSE dirigée par : Dr. HANDRICH Yves Chargé de recherches, Université de Strasbourg Dr.
    [Show full text]
  • Towards Left Duff S Mdbg Holt Winters Gai Incl Tax Drupal Fapi Icici
    jimportneoneo_clienterrorentitynotfoundrelatedtonoeneo_j_sdn neo_j_traversalcyperneo_jclientpy_neo_neo_jneo_jphpgraphesrelsjshelltraverserwritebatchtransactioneventhandlerbatchinsertereverymangraphenedbgraphdatabaseserviceneo_j_communityjconfigurationjserverstartnodenotintransactionexceptionrest_graphdbneographytransactionfailureexceptionrelationshipentityneo_j_ogmsdnwrappingneoserverbootstrappergraphrepositoryneo_j_graphdbnodeentityembeddedgraphdatabaseneo_jtemplate neo_j_spatialcypher_neo_jneo_j_cyphercypher_querynoe_jcypherneo_jrestclientpy_neoallshortestpathscypher_querieslinkuriousneoclipseexecutionresultbatch_importerwebadmingraphdatabasetimetreegraphawarerelatedtoviacypherqueryrecorelationshiptypespringrestgraphdatabaseflockdbneomodelneo_j_rbshortpathpersistable withindistancegraphdbneo_jneo_j_webadminmiddle_ground_betweenanormcypher materialised handaling hinted finds_nothingbulbsbulbflowrexprorexster cayleygremlintitandborient_dbaurelius tinkerpoptitan_cassandratitan_graph_dbtitan_graphorientdbtitan rexter enough_ram arangotinkerpop_gremlinpyorientlinkset arangodb_graphfoxxodocumentarangodborientjssails_orientdborientgraphexectedbaasbox spark_javarddrddsunpersist asigned aql fetchplanoriento bsonobjectpyspark_rddrddmatrixfactorizationmodelresultiterablemlibpushdownlineage transforamtionspark_rddpairrddreducebykeymappartitionstakeorderedrowmatrixpair_rddblockmanagerlinearregressionwithsgddstreamsencouter fieldtypes spark_dataframejavarddgroupbykeyorg_apache_spark_rddlabeledpointdatabricksaggregatebykeyjavasparkcontextsaveastextfilejavapairdstreamcombinebykeysparkcontext_textfilejavadstreammappartitionswithindexupdatestatebykeyreducebykeyandwindowrepartitioning
    [Show full text]
  • Call C# Dll from Php
    Call c# dll from php click here to download PHP has a built-in Windows-only extension called DOTNET that allows you to www.doorway.ru libraries in a PHP application. Note that you'll need to make sure your assemblies are declared as COM visible: [assembly: ComVisible(true)]. Here are two examples. php $stack = new DOTNET("mscorlib", "System. Build it as dll library output type www.doorway.ru framework ver as target. 4. load it to GAC vA. 5. Get public token from assembly list. 6. Put the token, and the class into php code and let Apache run: php $phpdotnet = new DOTNET("ClassLibraryTestPHP, Version=, Culture=neutral. Net assembly and call its methods and access its properties. $obj = new . exercise to try different type of method signature and calling them in php. www.doorway.ru Code . IMPORTANT NOTE: PHP "caches" the dll library, so every time that the dll library is compiled, the php service should be restarted (restart the apache service). A project of mine requires that I call a dll using php via a COM object call: $obj = new COM("www.doorway.ruObj") or die ("Unable to instantiate the COM!"); This call seems to work ok but the moment I try to call a function from the object using: $result = $obj->put_Name("A") ; none of the code after this. I currently have a classic ASP Web Application, it calls www.doorway.ru dll, setting it up as not easy but its possible. This year we will start moving all the ASP code and MS SQL to MySQL and PHP.
    [Show full text]
  • PHP Programming Language
    PHP Programming Language PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Thu, 17 Jun 2010 01:34:21 UTC Contents Articles Active Agenda 1 Active Calendar 2 Adminer 8 Aigaion 10 Aiki Framework 12 Asido 13 Associate- O- Matic 16 AutoTheme 18 Avactis 19 BakeSale 22 Beehive Forum 23 bitcart 25 BlueErp 29 BuddyPress 30 ccHost 32 Claroline 34 Comparison of knowledge base management software 36 concrete5 42 Coppermine Photo Gallery 44 Croogo 46 DBG 47 Delphi for PHP 47 Doctrine (PHP) 49 Dokeos 52 dotProject 55 User:Drietsch/ pimcore 57 DynPG 58 eAccelerator 59 Elgg (software) 60 EpesiBIM 62 Flash Gallery 64 Flash MP3 Player 66 FluxBB 68 Frog CMS 71 Gallery Project 73 Gamboo Web Suite 75 Gateway Anti- Virus 77 GoogleTap 78 Group- Office 79 Habari 81 Horde (software) 85 HuMo- gen 86 IPBWI 89 Icy Phoenix 91 Ingo (software) 94 Injader 95 Intelestream 96 Internet Messaging Program 98 Invision Power Board 99 ionCube 101 Joomla 103 Joomsef 106 KnowledgeBase Manager Pro 108 List of PHP accelerators 109 List of PHP libraries 112 Magic quotes 113 Mambo (software) 115 Merlintalk 120 MetaBB 122 MiaCMS 123 Midgard (software) 125 Midgard Lite 129 MindTouch Deki 130 Monkey Boards 134 Moodle 135 Moxietype 140 MyBB 141 NETSOFTWARE 144 net2ftp 146 User:Nichescript/ Affiliate Niche Sript 147 Ning (website) 148 NolaPro 152 ORMer 154 ocPortal 155 Open Realty 158 OpenBiblio 159 Opus (content management system) 161 osCommerce 163 PEAR 166 PHP accelerator 167 PHP syntax and semantics 168 PHP/
    [Show full text]
  • The Hiphop Virtual Machine
    The HipHop Virtual Machine Keith Adams Jason Evans Bertrand Maher Guilherme Ottoni Andrew Paroski Brett Simmers Edwin Smith Owen Yamauchi Facebook #"5/+ 4 # 3 '($ # % #$ % # #$ {kma,je,bertrand,ottoni,andrewparoski,bsimmers,smith,oyamauchi}@fb.com "! ) $ ! # $ % ( ( " * ! % + , $ ! . , $ $ 2 1 # $ - # / 0 % ! . / ( , - / $ # Abstract The most popular PHP implementation is a straightfor- The HipHop Virtual Machine (HHVM) is a JIT compiler ward interpreter [25]. While interpreters have the benefits of and runtime for PHP. While PHP values are dynamically simplicity and portability, they incur high CPU overheads. typed, real programs often have latent types that are use- As shown in Section 5, these overheads limit the perfor- ful for optimization once discovered. Some types can be mance of some of the most important and common PHP ap- proven through static analysis, but limitations in the ahead- plications. In this paper, we present the HipHop Virtual Machine of-time approach leave some types to be discovered at run 1 time. And even though many values have latent types, PHP (HHVM), a JIT and runtime for PHP designed with the programs can also contain polymorphic variables and ex- following goals: pressions, which must be handled without catastrophic slow- 1. Compatibility. Run large and complex PHP programs, down. whose development history was unrelated to that of HHVM discovers latent types by structuring its JIT HHVM, without modification. around the concept of a tracelet. A tracelet is approximately 2. High performance. Efficiently map PHP programs to a basic block specialized for a particular set of run-time the hardware, weakening PHP’s flexible primitives to types for its input values.
    [Show full text]
  • Framework Pro Strategické Webové Hry
    Univerzita Karlova v Praze Matematicko-fyzikální fakulta BAKALÁŘSKÁ PRÁCE Jan Pešek Framework pro strategické webové hry Katedra softwarového inženýrství Vedoucí bakalářské práce: Mgr. Miroslav Čermák Studijní program: Informatika Studijní obor: Obecná informatika Praha 2013 Rád bych zde poděkoval svému vedoucímu ročníkového projektu a bakalářské práce Mgr. Miroslavu Čermákovi, za jeho podporu, připomínky, odborné rady a vstřícný přístup během zpracování této práce. Dále bych chtěl poděkovat mému příteli Petru Šiškovi za vytvoření ilustrací pro vzorovou hru. Prohlašuji, že jsem tuto bakalářskou práci vypracoval samostatně a výhradně s použitím citovaných pramenů, literatury a dalších odborných zdrojů. Beru na vědomí, že se na moji práci vztahují práva a povinnosti vyplývající ze zákona č. 121/2000 Sb., autorského zákona v platném znění, zejména skutečnost, že Univerzita Karlova v Praze má právo na uzavření licenční smlouvy o užití této práce jako školního díla podle §60 odst. 1 autorského zákona. V Praze dne ............ Jan Pešek Název práce: Framework pro strategické webové hry Autor: Jan Pešek Katedra: Katedra softwarového inženýrství MFF UK Vedoucí bakalářské práce: Mgr. Miroslav Čermák, Katedra softwarového inženýr- ství MFF UK Abstrakt: Tato bakalářská práce popisuje softwarový projekt, který umožňuje tvorbu internetových tahových her v internetovém prohlížeči s důrazem na upra- vitelnost, tzv. framework. Výsledná aplikace umožňuje snadnou tvorbu tahové hry pro dva hráče, a poskytuje mechanismy pro pokročilou konfiguraci prostřed- nictvím modulů naprogramovaných uživatelem. Součástí projektu je vzorová hra s předdefinovanými daty, ukázkovými moduly a grafickou úpravou. V práci jsou zhodnoceny současné technologie použitelné pro vývoj interaktivních interneto- vých aplikací a diskutovány některé klíčové problémy, na které se při vývoji apli- kace naráží.
    [Show full text]
  • Improving Memory Management for HHVM
    Improving Memory Management Within the HipHop Virtual Machine Timothy Sergeant A thesis submitted in partial fulfilment of the degree of Bachelor of Advanced Computing (Honours) The Australian National University October 2014 c Timothy Sergeant 2014 Except where otherwise indicated, this thesis is my own original work. Timothy Sergeant 24 October 2014 To my parents, Evan and Elizabeth Acknowledgments Firstly, an enormous thank you to my supervisor, Steve Blackburn. Steve’s wealth of knowledge in the area has been endlessly valuable for this project. He was always able to provide useful advice for the problems I was facing, and talking with Steve always left me with renewed vigor for the project. Thank you to the members of the HHVM team at Facebook who I have talked to throughout the year, especially Bert Maher, Guilherme Ottoni and Joel Pobar, who have provided useful insight and speedy answers to my questions. A particular thanks to Joel for giving me the opportunity to experience Silicon Valley. To everyone else in the #hhvm IRC channel: Sorry for spamming you with endless failed build notifications. Thank you to Wayne Tsai and Peter Marshall for providing valuable feedback on draft copies of this thesis, as well as to everyone else in the honours cohort who has helped me throughout the year. Thank you to my housemates, Tom and Wayne, who somehow put up with the decreasing quality of my jokes as my stress level increased. Thank you also to the rest of my friends for being there for me throughout the year. Finally, thank you to my family, Evan, Elizabeth and Steph.
    [Show full text]
  • A Framework for Static Analysis of Dynamic Code Via Emulation
    Submission Version Emulization: a Framework for Static Analysis of Dynamic Code via Emulation Abbas Naderi-Afooshteh, Anh Nguyen-Tuong, Jason D. Hiser, Jack W. Davidson Department of Computer Science, University of Virginia [email protected], [email protected], [email protected], [email protected] Abstract Categories and Subject Descriptors F.3.2 [Logics and Static analysis of dynamic scripting code is a very chal- Meanings of Programs]: Semantics of Programming Languages— lenging problem due to the extensive use of dynamic features Program Analysis; D.3.4 [Programming Languages]: Processors— such as run-time code generation, dynamic aliasing, dynamic Interpreters; D.3.1 [Programming Languages]: Formal Defi- weak typing, and implicit object creation, to name a few. nitions and Theory With increasing popularity of dynamic languages, prior General Terms Design, Security research has focused on theoretical, or practical but ad- hoc solutions to handle many of these dynamic features. Keywords Dynamic Analysis, Static Analysis, Emulation Unfortunately, a comprehensive static analysis method that scales to popular real-world applications is lacking. 1. Introduction This work tackles the problem from a new perspective. Our Static analysis of dynamic applications, such as those writ- approach enables us to have an accurate, scalable method for ten in PHP, Javascript, Python or Bash Script, is an open analysis of dynamic applications. research problem. Several challenging problems plague anal- Our method, emulization, is based on a novel dynamic ysis of dynamic code. Constructing a sound or complete analysis powered by emulation, combined with static analysis. control flow graph (CFG), reasoning about dynamic evalua- The combination provides a framework for context and flow tions (i.e., calls to eval), type inference, error handling and sensitive dynamic and static analysis of dynamic applications.
    [Show full text]
  • The Hiphop Compiler for PHP
    The HipHop Compiler for PHP Haiping Zhao Iain Proctor Minghui Yang Xin Qi Mark Williams Qi Gao Guilherme Ottoni ∗ Andrew Paroski Scott MacVicar Jason Evans Stephen Tu † Facebook, Inc. Abstract 1. Introduction Scripting languages are widely used to quickly accomplish General-purpose scripting languages like Perl, Python, PHP, a variety of tasks because of the high productivity they en- Ruby, and Lua have been widely used to quickly accom- able. Among other reasons, this increased productivity re- plish a broad variety of tasks. Although there are several sults from a combination of extensive libraries, fast devel- reasons for the widespread adoption of these languages, the opment cycle, dynamic typing, and polymorphism. The dy- key common factor across all of them is the high program- namic features of scripting languages are traditionally asso- mers’ productivity that they enable [14]. This high produc- ciated with interpreters, which is the approach used to imple- tivity is the result of a number of factors. First, these lan- ment most scripting languages. Although easy to implement, guages typically provide a rich set of libraries, which re- interpreters are generally slow, which makes scripting lan- duce the amount of code that programmers need to write, guages prohibitive for implementing large, CPU-intensive test, and debug. Second, the dynamically-typed nature of applications. This efficiency problem is particularly impor- scripting languages provides flexibility and high degrees of tant for PHP given that it is the most commonly used lan- dynamic polymorphism. Last, and most important, dynamic guage for server-side web development. languages are in general purely interpreted, thus providing This paper presents the design, implementation, and an a fast cycle to modify and test source changes.
    [Show full text]