Synthesis of Semantic Actions in Attribute Grammars

Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to define the semantics of a language. However, drafting the semantic actions can be tricky and a large drain on developer time. In this work, we...

Full description

Saved in:
Bibliographic Details
Published in:2022 Formal Methods in Computer-Aided Design (FMCAD) pp. 304 - 314
Main Authors: Kalita, Pankaj Kumar, Kumar, Miriyala Jeevan, Roy, Subhajit
Format: Conference Proceeding
Language:English
Published: FMCAD Association and authors 18.10.2022
Subjects:
ISSN:2708-7824
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to define the semantics of a language. However, drafting the semantic actions can be tricky and a large drain on developer time. In this work, we propose a synthesis methodology to automatically infer the semantic actions from a set of examples associating strings to their meanings. We also propose a new coverage metric, derivation coverage. We use it to build a sampler to effectively and automatically draw strings to drive the synthesis engine. We build our ideas into our tool, PĀNINI, and empirically evaluate it on twelve benchmarks, including a forward differentiation engine, an interpreter over a subset of Java bytecode, and a mini-compiler for C language to two-address code. Our results show that PĀNINI scales well with the number of actions to be synthesized and the size of the context-free grammar, significantly outperforming simple baselines.
AbstractList Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to define the semantics of a language. However, drafting the semantic actions can be tricky and a large drain on developer time. In this work, we propose a synthesis methodology to automatically infer the semantic actions from a set of examples associating strings to their meanings. We also propose a new coverage metric, derivation coverage. We use it to build a sampler to effectively and automatically draw strings to drive the synthesis engine. We build our ideas into our tool, PĀNINI, and empirically evaluate it on twelve benchmarks, including a forward differentiation engine, an interpreter over a subset of Java bytecode, and a mini-compiler for C language to two-address code. Our results show that PĀNINI scales well with the number of actions to be synthesized and the size of the context-free grammar, significantly outperforming simple baselines.
Author Kumar, Miriyala Jeevan
Roy, Subhajit
Kalita, Pankaj Kumar
Author_xml – sequence: 1
  givenname: Pankaj Kumar
  orcidid: 0000-0001-5826-0030
  surname: Kalita
  fullname: Kalita, Pankaj Kumar
  email: pkalita@cse.iitk.ac.in
  organization: Indian Institute of Technology Kanpur,Computer Science and Engineering,Kanpur,India
– sequence: 2
  givenname: Miriyala Jeevan
  surname: Kumar
  fullname: Kumar, Miriyala Jeevan
  email: g1.miriyala@gmail.com
  organization: Fortanix Tech. India Pvt. Ltd.,Bengaluru,India
– sequence: 3
  givenname: Subhajit
  orcidid: 0000-0002-3394-023X
  surname: Roy
  fullname: Roy, Subhajit
  email: subhajit@iitk.ac.in
  organization: Indian Institute of Technology Kanpur,Computer Science and Engineering,Kanpur,India
BookMark eNotzT1PwzAUhWGDQKIt_QcM3pjcOv64vh6jCgpSJYbCHNnhRlgiDorN0H9PBUxHeobzLtlVnjIxdt_IjTZOua2SSm1TiXnjHQot0BqDQlotVKfdBVvqXzmDv2QL5SQKh8rcsHUpKUqjDHiPsGD6eMr1g0oqfBr4kcaQa-p529c05cJT5m2tc4rflfh-DuMY5nLLrofwWWj9vyv29vjwunsSh5f98649iNRoU0VAtBgDkAJqqAEpo0TvwVvnAziIypjBBW3JwLsfjB166-UZejeAVaBX7O7vNxFR9zWnc_zUNVIqsIj6B0SwSYA
ContentType Conference Proceeding
DBID 6IE
6IL
CBEJK
RIE
RIL
DOI 10.34727/2022/isbn.978-3-85448-053-2_37
DatabaseName IEEE Electronic Library (IEL) Conference Proceedings
IEEE Xplore POP ALL
IEEE Xplore All Conference Proceedings
IEEE Xplore
IEEE Proceedings Order Plans (POP All) 1998-Present
DatabaseTitleList
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE Electronic Library (IEL)
  url: https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
EISBN 3854480539
9783854480532
EISSN 2708-7824
EndPage 314
ExternalDocumentID 10026588
Genre orig-research
GroupedDBID 6IE
6IL
ALMA_UNASSIGNED_HOLDINGS
CBEJK
M43
RIE
RIL
ID FETCH-LOGICAL-i134t-a8858ba6e26e1e1600b089969579a676b244f7a35e46d9f45fc5907a3c7f65263
IEDL.DBID RIE
ISICitedReferencesCount 5
ISICitedReferencesURI http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001062691400037&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
IngestDate Wed Jun 26 19:26:14 EDT 2024
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-i134t-a8858ba6e26e1e1600b089969579a676b244f7a35e46d9f45fc5907a3c7f65263
ORCID 0000-0001-5826-0030
0000-0002-3394-023X
PageCount 11
ParticipantIDs ieee_primary_10026588
PublicationCentury 2000
PublicationDate 2022-Oct.-18
PublicationDateYYYYMMDD 2022-10-18
PublicationDate_xml – month: 10
  year: 2022
  text: 2022-Oct.-18
  day: 18
PublicationDecade 2020
PublicationTitle 2022 Formal Methods in Computer-Aided Design (FMCAD)
PublicationTitleAbbrev FMCAD
PublicationYear 2022
Publisher FMCAD Association and authors
Publisher_xml – name: FMCAD Association and authors
SSID ssib042469986
Score 1.8459386
Snippet Attribute grammars allow the association of semantic actions to the production rules in context-free grammars, providing a simple yet effective formalism to...
SourceID ieee
SourceType Publisher
StartPage 304
SubjectTerms Attribute grammar
C languages
Codes
Design automation
Java
Measurement
Production
Program synthesis
Semantic actions
Semantics
Syntax directed definition
Title Synthesis of Semantic Actions in Attribute Grammars
URI https://ieeexplore.ieee.org/document/10026588
WOSCitedRecordID wos001062691400037&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1LSwMxEA5WRDypWPFNDoKntOadPRaxepBSqEpvJUknsAe30t0K_nuTbKt48OAt5JLXkG--zHwZhK6LoISNnjEpIr4TITQjVktKnEvlp8KtpTlB9vVJj0ZmOi3Ga7F61sIAQE4-g15q5lj-fOFX6amsn74LjYhpOqijtWrFWhvjESwSvcKoXXSTmGgcVCdiz_qJK_XaJAAjIxkh0ewIm_Hf9VQynAz3_zmRA9T9Eebh8TfkHKItqI4Qn3xW0Y2ryxovAp7AW9ys0uNBVizUuKzwoGnrWgF-WNokVqu76GV4_3z3SNa1EEhJuWiINUYaZxUwBRRodFNcCtipFGWzSisXYTpoyyUINS-CkMHLyHst9zooyRQ_RtvVooIThAMPWgIEBsoLR6nVwjlurXDS-jkXp6ibVjx7b7-7mG0We_ZH_znaSxudLnRqLtB2s1zBJdrxH01ZL6_yIX0B24uRJQ
linkProvider IEEE
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1NS8MwGA46RT2pOPHbHARP2Uzz2eMQ58Q5BpuyW0m6N9DDOlk7wX9v0m6KBw_eQiGk-aDP-_R9nzwI3cROcuMjYxJ7fCecq4gYJSixNthPuTtDqwLZt74aDPRkEg9XYvVKCwMAVfEZtEKzyuVP5-ky_Cprh-tCPWLqTbQVrLPiWq61Pj488lQv1nIH3QYu6odVgdpH7cCWWnUZgPb9NPEHj0QJ--2oUgFKd_-fr3KAmj_SPDz8Bp1DtAH5EWKjz9wHckVW4LnDI5j55cpS3Kk0CwXOctwpa2crwI8LE-RqRRO9dh_G9z2yckMgGWW8JEZroa2REEmgQH2gYkPKToY8m5FKWg_UThkmgMtp7LhwqfDM17BUOSkiyY5RI5_ncIKwY04JABeBTLml1ChuLTOGW2HSKeOnqBlmnLzXF14k68me_fH8Gu32xi_9pP80eD5He2HRw-ed6gvUKBdLuETb6UeZFYurasO-AKnZlHQ
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=proceeding&rft.title=2022+Formal+Methods+in+Computer-Aided+Design+%28FMCAD%29&rft.atitle=Synthesis+of+Semantic+Actions+in+Attribute+Grammars&rft.au=Kalita%2C+Pankaj+Kumar&rft.au=Kumar%2C+Miriyala+Jeevan&rft.au=Roy%2C+Subhajit&rft.date=2022-10-18&rft.pub=FMCAD+Association+and+authors&rft.eissn=2708-7824&rft.spage=304&rft.epage=314&rft_id=info:doi/10.34727%2F2022%2Fisbn.978-3-85448-053-2_37&rft.externalDocID=10026588