CHR.js: A CHR Implementation in JavaScript
Autor: | Falco Nogatz, Thom Frühwirth, Dietmar Seipel |
---|---|
Rok vydání: | 2018 |
Předmět: |
Constraint Handling Rules
business.industry Programming language Computer science 020207 software engineering 02 engineering and technology computer.software_genre JavaScript Prolog TheoryofComputation_MATHEMATICALLOGICANDFORMALLANGUAGES Imperative programming TheoryofComputation_LOGICSANDMEANINGSOFPROGRAMS 0202 electrical engineering electronic engineering information engineering Web application 020201 artificial intelligence & image processing Compiler business computer Execution model Logic programming computer.programming_language |
Zdroj: | Rules and Reasoning ISBN: 9783319999050 RuleML+RR |
DOI: | 10.1007/978-3-319-99906-7_9 |
Popis: | Constraint Handling Rules (CHR) is usually compiled to logic programming languages. While there are implementations for imperative programming languages such as C and Java, its most popular host language remains Prolog. In this paper, we present Chr.js, a CHR system implemented in JavaScript, that is suitable for both the server-side and interactive client-side web applications. Chr.js provides (i) an interpreter, which is based on the asynchronous execution model of JavaScript, and (ii) an ahead-of-time compiler, resulting in synchronous constraint solvers with better performances. Because of the great popularity of JavaScript, Chr.js is the first CHR system that runs on almost all and even mobile devices, without the need for an additional runtime environment. As an example application we present the Chr.js Playground, an offline-capable web-interface which allows the interactive exploration of CHRs in every modern browser. |
Databáze: | OpenAIRE |
Externí odkaz: |