137,045 research outputs found
The Design of Terra: Harnessing the Best Features of High-Level and Low-Level Languages
Applications are often written using a combination of high-level and low-level languages since it allows performance critical parts to be carefully optimized, while other parts can be written more productively. This approach is used in web development, game programming, and in build systems for applications themselves. However, most languages were not designed with interoperability in mind, resulting in glue code and duplicated features that add complexity. We propose a two-language system where both languages were designed to interoperate. Lua is used for our high-level language since it was originally designed with interoperability in mind. We create a new low-level language, Terra, that we designed to interoperate with Lua. It is embedded in Lua, and meta-programmed from it, but has a low level of abstraction suited for writing high-performance code. We discuss important design decisions - compartmentalized runtimes, glue-free interoperation, and meta-programming features - that enable Lua and Terra to be more powerful than the sum of their parts
Staattisesti tyypitetyt ohjelmointikielet JavaScript-ekosysteemissä: tyyppijärjestelmien näkökulma
JavaScript is a ubiquitous programming language with usage in web, mobile applications and server software. The status of the language as the de-facto programming language of the web has made the language ecosystem advanced with a great number of userspace libraries and major companies working on efficient runtime systems. The core language, however, has numerous known difficulties caused by the initial design and persisted by the requirements for backwards-compatibility. In the last decade, a number of programming languages have chosen JavaScript as the compile target of the language.
Type theory and its application, programming language type systems, is an essential area of study in the design of programming languages. Every high-level programming language features a type system that greatly influences the ways of designing and implementing programs in the language. This thesis examines a group of selected statically-typed programming languages that compile to JavaScript. The core topics of research in this thesis are the motivation for new JS-compiled languages, the type system design of the languages, and the future direction of the JavaScript ecosystem based on the current trends and parallels to other programming ecosystems.
The results of the work include identifying several trends in type systems for the JS ecosystem and the web. These include unsound yet convenient partially inferred type systems for object-oriented and multi-paradigm programming and fully inferred extended Hindley-Milner type systems for primarily functional programming languages. Additionally, different options for the advancement of the programming ecosystem, including type annotations, inference of dynamically typed languages and new compile targets, are explored. Finally, based on the design choices of the languages researched, we provide several recommendations for safe and productive statically typed programming in the JavaScript ecosystem.JavaScript on laajalti käytetty ohjelmointikieli, jonka käyttö ulottuu web- ja mobiilisovelluksiin sekä palvelinohjelmistoon. Kielen asema web-kehityksen de-facto-ohjelmointikielenä on luonut sen ympärille laajan ohjelmistoekosysteemin, joka kattaa suuren määrän ohjelmistokirjastoja sekä tehokkaita ajoympäristöjä. Itse kieli aiheuttaa tästä huolimatta vaikeuksia alkuperäisten suunnitteluvirheiden ja vaaditun taaksepäinyhteensopivuuden vuoksi. Viimeisen vuosikymmenen aikana useampi ohjelmointikieli on alkanut käyttää JavaScriptia käännöskohteenaan.
Tyyppiteoria ja sen sovellus, ohjelmointikielten tyyppijärjestelmät, on tärkeä tutkimusala liittyen ohjelmointikielten suunnitteluun. Tyyppijärjestelmä on osa jokaista korkean tason ohjelmoinikieltä ja vaikuttaa täten suuresti itse ohjelmointikielen muihin ominaisuuksiin ja käyttöön. Tämä tutkimus käsittelee joukkoa staattisesti tyypitettyjä ohjelmointikieliä, jotka kääntyvät JavaScript-koodiksi. Tutkimuksen ytimessä ovat uusien kielten kehityksen motiivit, kielten tyyppijärjestelmien suunnittelu ja ominaisuudet sekä JavaScript-ekosysteemin mahdolliset tulevaisuuden suunnat.
Työn tuloksena tunnistamme useita trendejä tyyppijärjestelmien suunnittelussa JavaScript-ekosysteemiin. Näihin kuuluu käytännölliset, mutta teoriassa epäturvalliset tyyppijärjestelmät olio- ja moniparadigmaohjelmoinkieliin sekä funktionaalisten ohjelmointikielien Hindley-Milner-pohjaiset tyyppijärjestelmät, joissa muuttujien tyypit pystytään täysin päättelemään ilman ohjelman kirjoittajan annotaatioita. Lisäksi nostamme esiin useita tulevaisuuden suuntia, jotka voisivat viedä JS-ekosysteemiä eteenpäin. Näihin kuuluvat tyyppiannotaatiot, dynaamisten kielten tyyppi-inferenssi ja uudet käännöskohteet web-ekosysteemiin. Lopuksi annamme tutkimuksen perusteella suosituksia ominaisuuksista ja suunnitteluratkaisuista, jotka voisivat mahdollistaa tehokkaan ja turvallisen ohjelmistokehityksen JavaScript-ekosysteemissä tulevaisuudessa
Core language for web applications
Trabalho apresentado no âmbito do Mestrado em
Engenharia Informática, como requisito parcial
para obtenção do grau de Mestre em Engenharia
InformáticaWeb applications have a very high demand for rapid development and constant change.
Several languages were created for this kind of applications, which are very flexible but
many times trade the benefits of strongly-typed programming languages by untyped interpreted languages. With this kind of languages the interaction between different layers in a web application is usually developed using dialects and programming conventions with no real mechanical verifications between the client and server sides, and the SQL code within the application and the database.
We present a typed core language for web applications that integrates the typing of
the interface definition, business logic, and database manipulation representing these
interactions at a high abstract level. Using only one language, typed and with its own
instructions to define the interface and the interaction with the database, becomes possible to make static checks. Thereby, avoiding execution errors caused by the usual
heterogeneity among web applications. We also describe the implementation of a prototype with a highly flexible programming environment for our language that allows
the application development and publishing tasks to be done through a web interface,
interacting directly with the application and without loosing the integrity checks. This kind of development relies on an agile development methodology. Therefore, the modifications made to the application are made active using the dynamic reconfiguration
mechanism, avoiding the recompilation of the application and system restart
Development and evaluation of an engaging web-based content sequencing system for learning basic programming
Java basic programming is one of programming languages that is offered to students as a
compulsory course for Information Technology or Computer Science programs. This subject requires students to learn skills and techniques of programming rather than theoretical concepts. Usually, students have problems to capture and understand the content of the course which resulted in low performance or withdrawal from the program and even the education system. In general, web-based learning can be used as a tool to improve learning including programming courses. A specific instance of web-based learning; called content sequencing systems have a high potential to provide adaptive learning for programming languages. Adaptive content sequencing systems analyze individual difference of students and sequence the learning contents based on the students’ needs. By addressing students’ individual differences, it helps students to be actively engaged in the learning process. An engagement is a key element in learning. In this research, the level of students’ engagement is measured using "flow theory". This theory suggested three cognitive conditions when one is doing a particular activity, namely flow (engaged), boredom, and anxiety. Engagement occurs when an individual has an equal level of skill with the given level of challenge. Anxiety and boredom occur when there is unequal level of challenge and skill. The fundamental concepts of the
theory are represented in a user interface design by imposing a component known as "flow buttons". The used of the buttons is described as Skill-Challenge Balancing (SCB) technique and it is adapted in a web-based learning system called "LearnJava". It incorporates SCB where its main components are a user interface design and a sequencing engine. Based on this technique, the students’ level of knowledge will be evaluated and analyzed to identify their current level of skill. The technique will
sequence the learning contents based on the students’ current level of skill to keep them
engage in the web-based learning. An experimental study was conducted to evaluate how
effective SCB in helping students to engage in web-based learning. The results suggested
that the SCB technique improved students’ engagement in web-based learning
Recommended from our members
Democratizing Web Automation: Programming for Social Scientists and Other Domain Experts
We have promised social scientists a data revolution, but it has not arrived. What stands between practitioners and the data-driven insights they want? Acquiring the data. In particular, acquiring the social media, online forum, and other web data that was supposed to help them produce big, rich, ecologically valid datasets. Web automation programming is resistant to high-level abstractions, so end-user programmers end up stymied by the need to reverse engineer website internals—DOM, JavaScript, AJAX. Programming by Demonstration (PBD) offered one promising avenue towards democratizing web automation. Unfortunately, as the web matured, the programs became too complex for PBD tools to synthesize, and web PBD progress stalled.This dissertation describes how I reformulated traditional web PBD around the insight that demonstrations are not always the easiest way for non-programmers to communicate their intent. By shifting from a purely Programming-By-Demonstration view to a Programming-By-X view that accepts a variety of user-friendly inputs, we can dramatically broaden the class of programs that come in reach for end-user programmers. Our Helena ecosystem combines (i) usable PBD-based program drafting tools, (ii) learnable programming languages, and (iii) novel programming environment interactions. The end result: non-coders write Helena programs in 10 minutes that can handle the complexity of modern webpages, while coders attempt the same task and time out in an hour. I conclude with a discussion of the abstraction-resistant domains that will fall next and how hybrid PL-HCI breakthroughs will vastly expand access to programming
EffectiveSan: Type and Memory Error Detection using Dynamically Typed C/C++
Low-level programming languages with weak/static type systems, such as C and
C++, are vulnerable to errors relating to the misuse of memory at runtime, such
as (sub-)object bounds overflows, (re)use-after-free, and type confusion. Such
errors account for many security and other undefined behavior bugs for programs
written in these languages. In this paper, we introduce the notion of
dynamically typed C/C++, which aims to detect such errors by dynamically
checking the "effective type" of each object before use at runtime. We also
present an implementation of dynamically typed C/C++ in the form of the
Effective Type Sanitizer (EffectiveSan). EffectiveSan enforces type and memory
safety using a combination of low-fat pointers, type meta data and type/bounds
check instrumentation. We evaluate EffectiveSan against the SPEC2006 benchmark
suite and the Firefox web browser, and detect several new type and memory
errors. We also show that EffectiveSan achieves high compatibility and
reasonable overheads for the given error coverage. Finally, we highlight that
EffectiveSan is one of only a few tools that can detect sub-object bounds
errors, and uses a novel approach (dynamic type checking) to do so.Comment: To appear in the Proceedings of 39th ACM SIGPLAN Conference on
Programming Language Design and Implementation (PLDI2018
LMS-Verify: abstraction without regret for verified systems programming
Performance critical software is almost always developed in C, as programmers do not trust high-level languages to deliver the same reliable performance. This is bad because low-level code in unsafe languages attracts security vulnerabilities and because development is far less productive, with PL advances mostly lost on programmers operating under tight performance constraints. High-level languages provide memory safety out of the box, but they are deemed too slow and unpredictable for serious system software.
Recent years have seen a surge in staging and generative programming: the key idea is to use high-level languages and their abstraction power as glorified macro systems to compose code fragments in first-order, potentially domain-specific, intermediate languages, from which fast C can be emitted. But what about security? Since the end result is still C code, the safety guarantees of the high-level host language are lost.
In this paper, we extend this generative approach to emit ACSL specifications along with C code. We demonstrate that staging achieves ``abstraction without regret'' for verification: we show how high-level programming models, in particular higher-order composable contracts from dynamic languages, can be used at generation time to compose and generate first-order specifications that can be statically checked by existing tools. We also show how type classes can automatically attach invariants to data types, reducing the need for repetitive manual annotations.
We evaluate our system on several case studies that varyingly exercise verification of memory safety, overflow safety, and functional correctness. We feature an HTTP parser that is (1) fast (2) high-level: implemented using staged parser combinators (3) secure: with verified memory safety. This result is significant, as input parsing is a key attack vector, and vulnerabilities related to HTTP parsing have been documented in all widely-used web servers.</jats:p
Entorno tecnológico (Lenguajes)
[ES]Los lenguajes de programación son lo que nos permite programar a las maquinas para que realicen las tareas que necesitamos. Dentro de los lenguajes de programación están los de alto nivel (los mas cercanos al lenguaje humano) y los de bajo nivel (los mas cercanos al lenguaje maquina). Además, estos lenguajes pueden estar enfocados a las aplicaciones, a las paginas web o a las aplicaciones de los movieres. En este capitulo se presenta PHP un lenguaje de alto nivel desarrollado específicamente para realizar paginas web. Por último, se completa el capitulo con un caso de uso de la interacción del len-guaje PHP con una base de datos.[EN]Programming languages are what allow us to program machines to perform the tasks we need. Among the programming languages are high level (the closest to human language) and low level (the closest to machine language). In addition, these languages can be focused on applications, web pages or mobile applications. In this chapter PHP is presented a high level language developed specif-ically to make web pages. Finally, the chapter is completed with a case of the use of PHP language interaction with a database
Staging Telephony Service Creation: A Language Approach
International audienceThe open-endedness of telephony platforms is creating expectations among users, ranging from end-users to administrators, to create services dedicated to their activities. Not only is the population of developers heterogeneous, but the technologies underlying modern telephony range over a variety of areas such as multimedia, databases, web services, and distributed systems. This situation drastically widens the expertise required for service creation. We propose an approach to coping with the heterogeneity of both the service developers and the technologies underlying modern telephony. Our approach is based on programming languages. It consists of providing a language that is specific to each developer community with respect to its expertise (e.g., programming skills) and the target application area (e.g., administration). Such languages, called Domain-Specific Languages (DSLs), are organized in layers, accounting for abstraction levels. Our layered approach to telephony service creation is illustrated by two high-level DSLs for end-user service creation, requiring no programming skills, and an expressive DSL enabling the development of expert-level telephony services. We show that layering DSLs greatly facilitates their implementation and verification of telephony-specific properties by leveraging on high-level tools
- …