{'fraction_non_alphanumeric': 0.016010673782521682, 'fraction_numerical': 0.0, 'mean_word_length': 5.6371681415929205, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards a formal semantics for a structurally dynamic noncausal modelling language

Modelling and simulation languages are evolving rapidly to support modelling of systems of ever increasing size and complexity. A relatively recent development in the area of physical modelling is the noncausal modelling languages. They support a declarative, highly modular modelling approach, promoting the reuse of components. Modelica is a prime example of this class of languages. However, the mainstream representatives of this class of languages provide limited support for higher-order modelling and structurally dynamic systems. Moreover, the semantics of this class of languages remains a relatively unexplored area. Functional Hybrid Modelling (FHM) is a novel approach to noncausal, hybrid modelling that aims to address these concerns. In this paper, we give a semantics to the discrete part of a simple FHM language expressed in dependent type theory. We use Normalisation by Evaluation to produce a type-preserving and terminating normalisation procedure, the latter property being particularly important for FHM as highly structurally dynamic systems are supported by computing new system configurations during simulation. Furthermore, our implementation has been carefully structured to allow continuous aspects of the semantics to be described separately, in whatever way is deemed appropriate, while retaining the ability to describe precisely how a system evolves in response to discrete events.