Change search
Link to record
Permanent link

Direct link
BETA
Publications (10 of 59) Show all publications
Palmkvist, V. & Broman, D. (2019). Creating domain-specific languages by composing syntactical constructs. In: 21st International Symposium on Practical Aspects of Declarative Languages, PADL 2019: . Paper presented at 21st International Symposium on Practical Aspects of Declarative Languages, PADL 2019, Lisbon, Portugal, 14 January 2019 through 15 January 201 (pp. 187-203). Springer, 11372
Open this publication in new window or tab >>Creating domain-specific languages by composing syntactical constructs
2019 (English)In: 21st International Symposium on Practical Aspects of Declarative Languages, PADL 2019, Springer, 2019, Vol. 11372, p. 187-203Conference paper, Published paper (Refereed)
Abstract [en]

Creating a programming language is a considerable undertaking, even for relatively small domain-specific languages (DSLs). Most approaches to ease this task either limit the flexibility of the DSL or consider entire languages as the unit of composition. This paper presents a new approach using syntactical constructs (also called syncons) for defining DSLs in much smaller units of composition while retaining flexibility. A syntactical construct defines a single language feature, such as an if statement or an anonymous function. Each syntactical construct is fully self-contained: it specifies its own concrete syntax, binding semantics, and runtime semantics, independently of the rest of the language. The runtime semantics are specified as a translation to a user defined target language, while the binding semantics allow name resolution before expansion. Additionally, we present a novel approach for dealing with syntactical ambiguity that arises when combining languages, even if the languages are individually unambiguous. The work is implemented and evaluated in a case study, where small subsets of OCaml and Lua have been defined and composed using syntactical constructs.

Place, publisher, year, edition, pages
Springer, 2019
Series
Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), ISSN 0302-9743 ; 11372
National Category
Language Technology (Computational Linguistics)
Identifiers
urn:nbn:se:kth:diva-241375 (URN)10.1007/978-3-030-05998-9_12 (DOI)2-s2.0-85059674904 (Scopus ID)9783030059972 (ISBN)
Conference
21st International Symposium on Practical Aspects of Declarative Languages, PADL 2019, Lisbon, Portugal, 14 January 2019 through 15 January 201
Note

QC 20190121

Available from: 2019-01-21 Created: 2019-01-21 Last updated: 2019-04-12Bibliographically approved
Gomes, C., Thule, C., Broman, D., Larsen, P. G. & Vangheluwe, H. (2018). Co-Simulation: A Survey. ACM Computing Surveys, 51(3), Article ID 49.
Open this publication in new window or tab >>Co-Simulation: A Survey
Show others...
2018 (English)In: ACM Computing Surveys, ISSN 0360-0300, E-ISSN 1557-7341, Vol. 51, no 3, article id 49Article in journal (Refereed) Published
Abstract [en]

Modeling and simulation techniques are today extensively used both in industry and science. Parts of larger systems are, however, typically modeled and simulated by different techniques, tools, and algorithms. In addition, experts from different disciplines use various modeling and simulation techniques. Both these facts make it difficult to study coupled heterogeneous systems. Co-simulation is an emerging enabling technique, where global simulation of a coupled system can be achieved by composing the simulations of its parts. Due to its potential and interdisciplinary nature, cosimulation is being studied in different disciplines but with limited sharing of findings. In this survey, we study and survey the state-of-the-art techniques for co-simulation, with the goal of enhancing future research and highlighting the main challenges. To study this broad topic, we start by focusing on discrete-event-based co-simulation, followed by continuous-time-based co-simulation. Finally, we explore the interactions between these two paradigms, in hybrid co-simulation. To survey the current techniques, tools, and research challenges, we systematically classify recently published research literature on co-simulation, and summarize it into a taxonomy. As a result, we identify the need for finding generic approaches for modular, stable, and accurate coupling of simulation units, as well as expressing the adaptations required to ensure that the coupling is correct.

National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-232908 (URN)10.1145/3179993 (DOI)000439723400006 ()
Note

QC 20180808

Available from: 2018-08-08 Created: 2018-08-08 Last updated: 2018-08-08Bibliographically approved
Cremona, F., Lee, E. A., Lohstroh, M., Masin, M., Broman, D. & Tripakis, S. (2018). Hybrid Co-simulation: It's about time. In: Proceedings - 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, MODELS 2018: . Paper presented at 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, MODELS 2018, 14 October 2018 through 19 October 2018. Association for Computing Machinery, Inc
Open this publication in new window or tab >>Hybrid Co-simulation: It's about time
Show others...
2018 (English)In: Proceedings - 21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, MODELS 2018, Association for Computing Machinery, Inc , 2018Conference paper, Published paper (Refereed)
Abstract [en]

Model-based design methodologies are commonly used in industry for the development of cyber-physical systems (CPSs). There are many different languages, tools, and formalisms for model-based design, each with its strengths and weaknesses. Instead of accepting the weaknesses of a particular tool, an alternative is to embrace heterogeneity and develop tool integration platforms and protocols to leverage the strengths from other environments. A fairly recent attempt in this direction is an open interface standard called Functional Mock-up Interface (FMI), which is focused on the convenient exchange and co-simulation of simulation models (Functional Mock-up Units, FMUs), primarily between component suppliers and OEMs. As it stands, FMI has reached acceptance in industry, but its specification (version 2.0) provides only limited support for hybrid co-simulation-simulating systems that mix continuous and discrete behaviors, which are commonly used to model CPSs. This paper identifies FMI's time representation based on floating-point numbers as a key problem, because it does not support well the discrete events that typically occur at the cyber-physical boundary; it is only suitable for modeling continuous dynamics without discrete behaviors. While time is a central concept in reasoning about the physical world, it is largely abstracted away when reasoning about the cyber world. As a result, the engineering methods for CPSs have misaligned abstractions between the physics domain, the mathematical domain used to model physics, the computational domain used to implement these mathematical abstractions for simulation, and the computational domain used on the cyber side of CPSs. The most common resolution for this conundrum is to adopt the naive Newtonian ideal model of time, where time is a real number known everywhere and advancing uniformly. But ironically, Newtonian time proves not so practical for hybrid co-simulation. The obvious reason is that digital computers do not work with real numbers. Whereas real numbers have infinite precision, their floating-point representation does not. This discrepancy leads to unpredictable quantization errors that may accumulate. Although real numbers can be compared for equality (e.g., to define “simultaneity”), it rarely makes sense to do so for floating-point numbers. We show that the approach taken in FMI (and many other modeling frameworks) that embraces a naive Newtonian physical model of time, and a cyber-approximation of this model using floating-point numbers, is inadequate for CPSs; it leads to models with unnecessarily inexplicable, nondeterministic, and complex behaviors. Our analysis concludes that a model of time that solely uses integers solves many of these problems. Specifically, we propose to use a 64-bit unsigned integer representation with arbitrary resolution, given as a power of ten, allowing model parameters specified in decimal to be represented exactly (granted ample resolution). Integer arithmetic is computationally efficient, and, for well-chosen resolutions, this representation will tolerate very long simulations without overflow. It is also easily converted to and from floating-point representations, albeit not losslessly. Given the vast range of time scales used across different simulation models, we believe that choosing a fixed universal time resolution does not make sense. Instead, we describe an algorithm that picks an adequate time resolution for a particular model and we provide procedures for time quantization needed to reconcile discrepacies between internal time representations of co-simulated FMUs. We propose concrete extensions to the FMI standard for the support of hybrid co-simulation that enable the use of integer time, automatic choice of time resolution, and the use of absent signals. We explain in detail how these extensions can be implemented mod-ularly within the frameworks of existing simulation environments and with support for legacy FMUs and superdense time.

Place, publisher, year, edition, pages
Association for Computing Machinery, Inc, 2018
Keywords
Co-simulation, Functional Mock-up Interface, Time, Abstracting, Cyber Physical System, Digital computers, Embedded systems, Mockups, Co-simulations, Computationally efficient, Cyber physical systems (CPSs), Floating point numbers, Integer representation, Mathematical abstraction, Simulation environment, Digital arithmetic
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:kth:diva-247130 (URN)10.1145/3239372.3242896 (DOI)2-s2.0-85056887097 (Scopus ID)9781450349499 (ISBN)
Conference
21st ACM/IEEE International Conference on Model Driven Engineering Languages and Systems, MODELS 2018, 14 October 2018 through 19 October 2018
Note

QC 20190403

Available from: 2019-04-03 Created: 2019-04-03 Last updated: 2019-04-03Bibliographically approved
Broman, D. (2018). Hybrid Simulation Safety: Limbos and Zero Crossings. In: Principles of Modeling: Essays Dedicated to Edward A. Lee on the Occasion of His 60th Birthday (pp. 106-121). Springer
Open this publication in new window or tab >>Hybrid Simulation Safety: Limbos and Zero Crossings
2018 (English)In: Principles of Modeling: Essays Dedicated to Edward A. Lee on the Occasion of His 60th Birthday, Springer, 2018, p. 106-121Chapter in book (Refereed)
Abstract [en]

Physical systems can be naturally modeled by combining continuous and discrete models. Such hybrid models may simplify the modeling task of complex system, as well as increase simulation performance. Moreover, modern simulation engines can often efficiently generate simulation traces, but how do we know that the simulation results are correct? If we detect an error, is the error in the model or in the simulation itself? This paper discusses the problem of simulation safety, with the focus on hybrid modeling and simulation. In particular, two key aspects are studied: safe zero-crossing detection and deterministic hybrid event handling. The problems and solutions are discussed and partially implemented in Modelica and Ptolemy II.

Place, publisher, year, edition, pages
Springer, 2018
Series
Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), ISSN 0302-9743 ; 10760
Keywords
Hybrid semantics, Modeling, Simulation, Zero-crossing detector
National Category
Control Engineering
Identifiers
urn:nbn:se:kth:diva-238344 (URN)10.1007/978-3-319-95246-8_7 (DOI)2-s2.0-85052702866 (Scopus ID)978-3-319-95245-1 (ISBN)
Funder
Swedish Foundation for Strategic Research , FFL15-0032
Note

QC 20181113

Available from: 2018-11-13 Created: 2018-11-13 Last updated: 2018-11-13Bibliographically approved
Magnusson, M., Jonsson, L., Villani, M. & Broman, D. (2018). Sparse Partially Collapsed MCMC for Parallel Inference in Topic Models. Journal of Computational And Graphical Statistics, 27(2), 449-463
Open this publication in new window or tab >>Sparse Partially Collapsed MCMC for Parallel Inference in Topic Models
2018 (English)In: Journal of Computational And Graphical Statistics, ISSN 1061-8600, E-ISSN 1537-2715, Vol. 27, no 2, p. 449-463Article in journal (Refereed) Published
Abstract [en]

Topic models, and more specifically the class of latent Dirichlet allocation (LDA), are widely used for probabilistic modeling of text. Markov chain Monte Carlo (MCMC) sampling from the posterior distribution is typically performed using a collapsed Gibbs sampler. We propose a parallel sparse partially collapsed Gibbs sampler and compare its speed and efficiency to state-of-the-art samplers for topic models on five well-known text corpora of differing sizes and properties. In particular, we propose and compare two different strategies for sampling the parameter block with latent topic indicators. The experiments show that the increase in statistical inefficiency from only partial collapsing is smaller than commonly assumed, and can be more than compensated by the speedup from parallelization and sparsity on larger corpora. We also prove that the partially collapsed samplers scale well with the size of the corpus. The proposed algorithm is fast, efficient, exact, and can be used in more modeling situations than the ordinary collapsed sampler. Supplementary materials for this article are available online.

Place, publisher, year, edition, pages
American Statistical Association, 2018
Keywords
Bayesian inference, Computational complexity, Gibbs sampling, Latent Dirichlet allocation, Massive datasets, Parallel computing
National Category
Probability Theory and Statistics
Identifiers
urn:nbn:se:kth:diva-238254 (URN)10.1080/10618600.2017.1366913 (DOI)000435688200018 ()2-s2.0-85046690915 (Scopus ID)
Funder
Swedish Foundation for Strategic Research
Note

QC 20181031

Available from: 2018-10-31 Created: 2018-10-31 Last updated: 2018-10-31Bibliographically approved
Natarajan, S. & Broman, D. (2018). Timed C: An Extension to the C Programming Language for Real-Time Systems. In: Pellizzoni, R (Ed.), 24TH IEEE REAL-TIME AND EMBEDDED TECHNOLOGY AND APPLICATIONS SYMPOSIUM (RTAS 2018): . Paper presented at 24th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), APR 11-13, 2018, Porto, Portugal (pp. 227-239). IEEE
Open this publication in new window or tab >>Timed C: An Extension to the C Programming Language for Real-Time Systems
2018 (English)In: 24TH IEEE REAL-TIME AND EMBEDDED TECHNOLOGY AND APPLICATIONS SYMPOSIUM (RTAS 2018) / [ed] Pellizzoni, R, IEEE, 2018, p. 227-239Conference paper, Published paper (Refereed)
Abstract [en]

The design and implementation of real-time systems require that both the logical and the temporal behavior are correct. There exist several specialized languages and tools that use the notion of logical time, as well as industrial strength languages such as Ada and RTJS that incorporate direct handling of real time. Although these languages and tools have shown to be good alternatives for safety-critical systems, most commodity real-time and embedded systems are today implemented in the standard C programming language. Such systems are typically targeting proprietary bare-metal platforms, standard POSIX compliant platforms, or open-source operating systems. It is, however, error prone to develop large, reliable, and portable systems based on these APIs. In this paper, we present an extension to the C programming language, called Timed C, with a minimal set of language primitives, and show how a retargetable source-to-source compiler can be used to compile and execute simple, expressive, and portable programs. To evaluate our approach, we conduct a case study of a CubeSat satellite. We implement the core timing aspects in Timed C, and show portability by compiling on-board software to both flight hardware, and to low-cost experimental platforms.

Place, publisher, year, edition, pages
IEEE, 2018
Series
IEEE Real-Time and Embedded Technology and Applications Symposium, ISSN 1545-3421
National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-235153 (URN)10.1109/RTAS.2018.00031 (DOI)000443421100025 ()2-s2.0-85058496840 (Scopus ID)978-1-5386-5295-4 (ISBN)
Conference
24th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS), APR 11-13, 2018, Porto, Portugal
Funder
Swedish Foundation for Strategic Research , FFL15-0032
Note

QC 20180920

Available from: 2018-09-20 Created: 2018-09-20 Last updated: 2019-01-23Bibliographically approved
Kim, H., Broman, D., Kang, E. & Lee, E. A. (2017). An Architectural Mechanism for Resilient IoT Services. In: SafeThings 2017 - Proceedings of the 1st ACM International Workshop on the Internet of Safe Things, Part of SenSys 2017: . Paper presented at 1st ACM International Workshop on the Internet of Safe Things, SafeThings 2017, Delft, Netherlands, 5 November 2017 through (pp. 8-13). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>An Architectural Mechanism for Resilient IoT Services
2017 (English)In: SafeThings 2017 - Proceedings of the 1st ACM International Workshop on the Internet of Safe Things, Part of SenSys 2017, Association for Computing Machinery (ACM), 2017, p. 8-13Conference paper, Published paper (Refereed)
Abstract [en]

Availability of authentication and authorization services is critical for the safety of the Internet of Things (IoT). By leveraging an emerging network architecture based on edge computers, IoT’s availability can be protected even under situations such as network failures or denial-of-service (DoS) attacks. However, little has been explored for the issue of sustaining availability even when edge computers fail. In this paper, we propose an architectural mechanism for enhancing the availability of the authorization infrastructure for the IoT. The proposed approach leverages a technique called secure migration, which allows IoT devices to migrate to other local authorization entities served in trusted edge computers when their authorization entity becomes unavailable. Specifically, we point out necessary considerations for planning secure migration and present automated migration policy construction and protocols for preparing and executing the migration. The effectiveness of our approach is illustrated using a concrete application of smart buildings and network simulation, where our proposed solution achieves significantly higher availability in case of failures in some of the authorization entities.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2017
Keywords
Authentication, Authorization, Availability, Denial-of-service attacks, Internet of Things, Network security
National Category
Communication Systems
Identifiers
urn:nbn:se:kth:diva-224294 (URN)10.1145/3137003.3137010 (DOI)2-s2.0-85041416599 (Scopus ID)9781450354790 (ISBN)
Conference
1st ACM International Workshop on the Internet of Safe Things, SafeThings 2017, Delft, Netherlands, 5 November 2017 through
Funder
Swedish Foundation for Strategic Research , project FFL15-0032
Note

QC 20180316

Available from: 2018-03-16 Created: 2018-03-16 Last updated: 2018-03-16Bibliographically approved
Broman, D. & Siek, J. G. (2017). Gradually typed symbolic expressions. In: PEPM 2018 - Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2018: . Paper presented at 2018 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2018, 8 January 2018 through 9 January 2018 (pp. 15-29). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Gradually typed symbolic expressions
2017 (English)In: PEPM 2018 - Proceedings of the ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, Co-located with POPL 2018, Association for Computing Machinery (ACM), 2017, p. 15-29Conference paper, Published paper (Refereed)
Abstract [en]

Embedding a domain-specific language (DSL) in a general purpose host language is an efficient way to develop a new DSL. Various kinds of languages and paradigms can be used as host languages, including object-oriented, functional, statically typed, and dynamically typed variants, all having their pros and cons. For deep embedding, statically typed languages enable early checking and potentially good DSL error messages, instead of reporting runtime errors. Dynamically typed languages, on the other hand, enable flexible transformations, thus avoiding extensive boilerplate code. In this paper, we introduce the concept of gradually typed symbolic expressions that mix static and dynamic typing for symbolic data. The key idea is to combine the strengths of dynamic and static typing in the context of deep embedding of DSLs. We define a gradually typed calculus <*>, formalize its type system and dynamic semantics, and prove type safety. We introduce a host language called Modelyze that is based on <*>, and evaluate the approach by embedding a series of equation-based domain-specific modeling languages, all within the domain of physical modeling and simulation.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2017
Keywords
DSL, Symbolic expressions, Type systems, Calculations, Computer aided software engineering, Digital subscriber lines, Embedded systems, Problem oriented languages, Semantics, Specification languages, Domain specific language (DSL), Domain specific modeling languages, Dynamic semantic, Dynamically typed languages, Object oriented, Run-time errors, Symbolic expression, Modeling languages
National Category
Embedded Systems
Identifiers
urn:nbn:se:kth:diva-236452 (URN)10.1145/3162068 (DOI)000467285800003 ()2-s2.0-85050879640 (Scopus ID)9781450355872 (ISBN)
Conference
2018 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2018, 8 January 2018 through 9 January 2018
Funder
Swedish Foundation for Strategic Research , FFL15-0032Swedish Research Council, #623-2011-955
Note

QC 20181020

Available from: 2018-10-19 Created: 2018-10-19 Last updated: 2019-05-29Bibliographically approved
Kim, Y., Broman, D. & Shrivastava, A. (2017). Wcet-aware function-level dynamic code management on Scratchpad memory. ACM Transactions on Embedded Computing Systems, 16(4), Article ID 112.
Open this publication in new window or tab >>Wcet-aware function-level dynamic code management on Scratchpad memory
2017 (English)In: ACM Transactions on Embedded Computing Systems, ISSN 1539-9087, E-ISSN 1558-3465, Vol. 16, no 4, article id 112Article in journal (Refereed) Published
Abstract [en]

Scratchpad memory (SPM) is a promising on-chip memory choice in real-time and cyber-physical systems where timing is of the utmost importance. SPM has time-predictable characteristics since its data movement between the SPM and the main memory is entirely managed by software. One way of such management is dynamic management. In dynamic management of instruction SPMs, code blocks are dynamically copied from the main memory to the SPM at runtime by executing direct memory access (DMA) instructions. Code management techniques try to minimize the overhead of DMA operations by finding an allocation scheme that leads to efficient utilization. In this article, we present three function-level code management techniques. These techniques perform allocation at the granularity of functions, with the objective of minimizing the impact of DMA overhead to the worst-case execution time (WCET) of a given program. The first technique finds an optimal mapping of each function to a region using integer linear programming (ILP), whereas the second technique is a polynomial-time heuristic that is suboptimal. The third technique maps functions directly to SPM addresses, not using regions, which can further reduce the WCET. Based on ILP, it can also find an optimal mapping. We evaluate our techniques using the Mälardalen WCET suite, MiBench suite, and proprietary automotive applications from industry. The results show that our techniques can significantly reduce the WCET estimates compared to caches with the state-of-the-art cache analysis.

Place, publisher, year, edition, pages
Association for Computing Machinery, 2017
Keywords
Code management, Hard real-time systems, Scratchpad memory (SPM), Worst-case execution time (WCET), Codes (symbols), Embedded systems, Industrial management, Integer programming, Interactive computer systems, Mapping, Memory architecture, Optimization, Polynomial approximation, Automotive applications, Direct memory access, Dynamic management, Integer Linear Programming, Scratch pad memory, Worst-case execution time, Real time systems
National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-216507 (URN)10.1145/3063383 (DOI)000425114000022 ()2-s2.0-85019904220 (Scopus ID)
Note

QC 20171201

Available from: 2017-12-01 Created: 2017-12-01 Last updated: 2018-03-13Bibliographically approved
Jonsson, L., Borg, M., Broman, D., Sandahl, K., Eldh, S. & Runeson, P. (2016). Automated bug assignment: Ensemble-based machine learning in large scale industrial contexts. Journal of Empirical Software Engineering, 21(4), 1533-1578
Open this publication in new window or tab >>Automated bug assignment: Ensemble-based machine learning in large scale industrial contexts
Show others...
2016 (English)In: Journal of Empirical Software Engineering, ISSN 1382-3256, E-ISSN 1573-7616, Vol. 21, no 4, p. 1533-1578Article in journal (Refereed) Published
Abstract [en]

Bug report assignment is an important part of software maintenance. In particular, incorrect assignments of bug reports to development teams can be very expensive in large software development projects. Several studies propose automating bug assignment techniques using machine learning in open source software contexts, but no study exists for large-scale proprietary projects in industry. The goal of this study is to evaluate automated bug assignment techniques that are based on machine learning classification. In particular, we study the state-of-the-art ensemble learner Stacked Generalization (SG) that combines several classifiers. We collect more than 50,000 bug reports from five development projects from two companies in different domains. We implement automated bug assignment and evaluate the performance in a set of controlled experiments. We show that SG scales to large scale industrial application and that it outperforms the use of individual classifiers for bug assignment, reaching prediction accuracies from 50 % to 89 % when large training sets are used. In addition, we show how old training data can decrease the prediction accuracy of bug assignment. We advice industry to use SG for bug assignment in proprietary contexts, using at least 2,000 bug reports for training. Finally, we highlight the importance of not solely relying on results from cross-validation when evaluating automated bug assignment.

Place, publisher, year, edition, pages
Springer Science+Business Media B.V., 2016
National Category
Software Engineering
Identifiers
urn:nbn:se:kth:diva-174595 (URN)10.1007/s10664-015-9401-9 (DOI)000379060700004 ()2-s2.0-84941356343 (Scopus ID)
Note

QC 20160715

Available from: 2015-12-07 Created: 2015-10-07 Last updated: 2018-01-10Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0001-8457-4105

Search in DiVA

Show all publications