80 likes | 243 Views
An Executable Semantics as a Tool and Artifact of Language Standardization. Filip Murlak, University of Warsaw Jan Posiadała, Nodes and Edges Paweł Susicki, Nodes and Edges. Three in one. Formal. Readable. Executable. Executable Semantics. Reference Implementation. Natural Language
E N D
An Executable Semantics as a Tool and Artifact of Language Standardization Filip Murlak, University of Warsaw Jan Posiadała, Nodes and Edges Paweł Susicki, Nodes and Edges
Three in one Formal Readable Executable Executable Semantics Reference Implementation Natural Language Specification Denotational Semantics
Proof of concept: Cypher.PL • an executable semantics • of a declarative query language (Cypher) • in the formal declarative language of logic (Prolog) • as close to the semantics as possible • as far from the implementation issues as possible • covers TCK with 1500 lines of code (semantics) • a tool for collaborative language design • and also an artifact of the design process
Why in Prolog? • fully formalized declarative language • super-native representation of data with terms • built-in unification covers Cypher’s pattern matching • collects multiple matches (evident ambiguity) • easy constraint verification • native support for parsing (DCG) • built-in meta-programming • ISO standard (ISO/IEC 13211 by JTC 1/SC 22/WG 17)
Broad standardization scope to support • property graph query and update language • errors definitions, raising and handling • data definition languages for property graphs • languages interoperability • session, transaction and concurrency model • ...
Proposal A formal, readable, and executable semantics can and should be both a tool and an artifact of language standardization.
Specifying a standard Tue, 13:30 — 15:00 Come to discuss! Invitation Poster & Demo Tue, 17:15 — 18:15 Take a look at Cypher.PL!
References N. Francis, A. Green, P. Guagliardo, L. Libkin, T. Lindaaker, V. Marsault, S. Plantikow, M. Rydberg, M. Schuster, P. Selmer, and A. Taylor. Formal Semantics of the Language Cypher. CoRR, abs/1802.09984, 2018. N. E. Fuchs. Specifications are (preferably) executable. Software Engineering Journal, 7(5):323–334, 1992. R. A.Kowalski. The relation between logic programming and logic specification. Phil.Trans. of the Royal Society of London. 312(1522):345–361, 1984.