23 ms·
What are the advantages of Céu over other synchronous programming languages such as Esterel and Lustre?
by ratstew 10y ago
What are the advantages of Céu over other synchronous programming languages such as Esterel and Lustre?
- fsantanna 10y agoIn comparison to Esterel: 1. Dynamic abstractions with lexical scope (vs. mostly static language). You can dynamically spawn code into a lexically-scoped pool. 2. Internal/fine-grained determinism (vs. external determinism). All statements execute in a deterministic order. E.g., if you have two printf's in parallel awaking from the same event, they will execute in lexical order. 3. Safe integration with C. When calling a C function that returns a pointer (e.g., "malloc"), Céu forces you to write a finalization clause (in which you can call "free"). If this code is somehow aborted, the "free" is called automatically. 4. Timers as first-class events (e.g., "await 1s"). Besides the convenience, Céu adjusts timers in sequence, e.g., if a first timer awakes a little bit late (due to system overhead), the timer in sequence will compensate. 5. Internal events are stack-based (vs. queue based). This allows co-routine-like functionality, resumable exceptions, and some other mechanisms. 6. Event-based logical notion of time (vs. tick based). A single event can occur at a logical time (related to #2). [EDIT] Didn't mention that these are "advantages" depending on the context. Esterel targets hardware synthesis and also hard real-time systems. Dynamic abstractions might be irrelevant, fine-grained/sequential determinism in hardware might be inefficient, a tick is closer to a hardware clock, etc... In comparison to Lustre: Very different programming mindset. IIRC, in Lustre you define equations and the system is responsible for keeping them up-to-date/correct. It is a data-flow language (vs control-flow), closer to FRP than Céu/Esterel.
- junke 10y agoCéu looks really similar to Esterel. The thesis (http://www.ceu-lang.org/chico/ceu_phd.pdf http://www.ceu-lang.org/chico/ceu_phd.pdf) has a section titled "III.7 Differences to Esterel". (edit: removed explanations, the other comment is more detailed).
- fsantanna 10y agoThanks, forgot to mention in the other comment that Céu is actually based on Esterel.
- deleted 10y ago[deleted]