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 Proceedings Order Plan All Online (POP All Online) 1998-present by volume
IEEE Xplore All Conference Proceedings
IEEE Xplore Digital Library
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.8460426
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/eLvHCXMwlV1LSwMxEB5sEfGk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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