Implementing Hybrid Semantics: From Functional to Imperative

09/29/2020
by   Sergey Goncharov, et al.
0

Hybrid programs combine digital control with differential equations, and naturally appear in a wide range of application domains, from biology and control theory to real-time software engineering. The entanglement of discrete and continuous behaviour inherent to such programs goes beyond the established computer science foundations, producing challenges related to e.g. infinite iteration and combination of hybrid behaviour with other effects. A systematic treatment of hybridness as a dedicated computational effect has emerged recently. In particular, a generic idealized functional language HybCore with a sound and adequate operational semantics has been proposed. The latter semantics however did not provide hints to implementing HybCore as a runnable language, suitable for hybrid system simulation (e.g. the semantics features rules with uncountably many premises). We introduce an imperative counterpart of HybCore, whose semantics is simpler and runnable, and yet intimately related with the semantics of HybCore at the level of hybrid monads. We then establish a corresponding soundness and adequacy theorem. To attest that the resulting semantics can serve as a firm basis for the implementation of typical tools of programming oriented to the hybrid domain, we present a web-based prototype implementation to evaluate and inspect hybrid programs, in the spirit of GHCi for Haskell and UTop for OCaml. The major asset of our implementation is that it formally follows the operational semantic rules.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/20/2009

Hybrid Rules with Well-Founded Semantics

A general framework is proposed for integration of rules and external fi...
research
02/20/2019

An Adequate While-Language for Hybrid Computation

Hybrid computation combines discrete and continuous dynamics in the form...
research
10/11/2017

Abductive functional programming, a semantic approach

We propose a call-by-value lambda calculus extended with a new construct...
research
02/21/2023

Denotational Semantics and a Fast Interpreter for jq

jq is a widely used tool that provides a programming language to manipul...
research
07/03/2018

A Semantics for Hybrid Iteration

The recently introduced notions of guarded traced (monoidal) category an...
research
10/27/2019

Declarative Semantics of the Hybrid Constraint Language HydLa

Hybrid systems are dynamical systems with continuous evolution of states...
research
12/22/2022

A Foundation for Functional Graph Programs: The Graph Transformation Control Algebra (GTA)

Applications of graph transformation (GT) systems often require control ...

Please sign up or login with your details

Forgot password? Click here to reset