SmartShell

Automated Shell Scripts Synthesis from Natural Language

Hao Li, Yu Ping Wang, Jie Yin, Gang Tan

Research output: Contribution to journalArticle

Abstract

Modern shell scripts provide interfaces with rich functionality for system administration. However, it is not easy for end-users to write correct shell scripts; misusing commands may cause unpredictable results. In this paper, we present SmartShell, an automated function-based tool for shell script synthesis, which uses natural language descriptions as input. It can help the computer system to "understand" users' intentions. SmartShell is based on two insights: (1) natural language descriptions for system objects (such as files and processes) and operations can be recognized by natural language processing tools; (2) system-administration tasks are often completed by short shell scripts that can be automatically synthesized from natural language descriptions. SmartShell synthesizes shell scripts in three steps: (1) using natural language processing tools to convert the description of a system-administration task into a syntax tree; (2) using program-synthesis techniques to construct a SmartShell intermediate-language script from the syntax tree; (3) translating the intermediate-language script into a shell script. Experimental results show that SmartShell can successfully synthesize 53.7% of tasks collected from shell-script helping forums.

Original languageEnglish (US)
Pages (from-to)197-220
Number of pages24
JournalInternational Journal of Software Engineering and Knowledge Engineering
Volume29
Issue number2
DOIs
StatePublished - Feb 1 2019

Fingerprint

Processing
Computer systems

All Science Journal Classification (ASJC) codes

  • Software
  • Computer Networks and Communications
  • Computer Graphics and Computer-Aided Design
  • Artificial Intelligence

Cite this

@article{ae96f3d1134e4021ac8e4ea0a62e71bd,
title = "SmartShell: Automated Shell Scripts Synthesis from Natural Language",
abstract = "Modern shell scripts provide interfaces with rich functionality for system administration. However, it is not easy for end-users to write correct shell scripts; misusing commands may cause unpredictable results. In this paper, we present SmartShell, an automated function-based tool for shell script synthesis, which uses natural language descriptions as input. It can help the computer system to {"}understand{"} users' intentions. SmartShell is based on two insights: (1) natural language descriptions for system objects (such as files and processes) and operations can be recognized by natural language processing tools; (2) system-administration tasks are often completed by short shell scripts that can be automatically synthesized from natural language descriptions. SmartShell synthesizes shell scripts in three steps: (1) using natural language processing tools to convert the description of a system-administration task into a syntax tree; (2) using program-synthesis techniques to construct a SmartShell intermediate-language script from the syntax tree; (3) translating the intermediate-language script into a shell script. Experimental results show that SmartShell can successfully synthesize 53.7{\%} of tasks collected from shell-script helping forums.",
author = "Hao Li and Wang, {Yu Ping} and Jie Yin and Gang Tan",
year = "2019",
month = "2",
day = "1",
doi = "10.1142/S0218194019500098",
language = "English (US)",
volume = "29",
pages = "197--220",
journal = "International Journal of Software Engineering and Knowledge Engineering",
issn = "0218-1940",
publisher = "World Scientific Publishing Co. Pte Ltd",
number = "2",

}

SmartShell : Automated Shell Scripts Synthesis from Natural Language. / Li, Hao; Wang, Yu Ping; Yin, Jie; Tan, Gang.

In: International Journal of Software Engineering and Knowledge Engineering, Vol. 29, No. 2, 01.02.2019, p. 197-220.

Research output: Contribution to journalArticle

TY - JOUR

T1 - SmartShell

T2 - Automated Shell Scripts Synthesis from Natural Language

AU - Li, Hao

AU - Wang, Yu Ping

AU - Yin, Jie

AU - Tan, Gang

PY - 2019/2/1

Y1 - 2019/2/1

N2 - Modern shell scripts provide interfaces with rich functionality for system administration. However, it is not easy for end-users to write correct shell scripts; misusing commands may cause unpredictable results. In this paper, we present SmartShell, an automated function-based tool for shell script synthesis, which uses natural language descriptions as input. It can help the computer system to "understand" users' intentions. SmartShell is based on two insights: (1) natural language descriptions for system objects (such as files and processes) and operations can be recognized by natural language processing tools; (2) system-administration tasks are often completed by short shell scripts that can be automatically synthesized from natural language descriptions. SmartShell synthesizes shell scripts in three steps: (1) using natural language processing tools to convert the description of a system-administration task into a syntax tree; (2) using program-synthesis techniques to construct a SmartShell intermediate-language script from the syntax tree; (3) translating the intermediate-language script into a shell script. Experimental results show that SmartShell can successfully synthesize 53.7% of tasks collected from shell-script helping forums.

AB - Modern shell scripts provide interfaces with rich functionality for system administration. However, it is not easy for end-users to write correct shell scripts; misusing commands may cause unpredictable results. In this paper, we present SmartShell, an automated function-based tool for shell script synthesis, which uses natural language descriptions as input. It can help the computer system to "understand" users' intentions. SmartShell is based on two insights: (1) natural language descriptions for system objects (such as files and processes) and operations can be recognized by natural language processing tools; (2) system-administration tasks are often completed by short shell scripts that can be automatically synthesized from natural language descriptions. SmartShell synthesizes shell scripts in three steps: (1) using natural language processing tools to convert the description of a system-administration task into a syntax tree; (2) using program-synthesis techniques to construct a SmartShell intermediate-language script from the syntax tree; (3) translating the intermediate-language script into a shell script. Experimental results show that SmartShell can successfully synthesize 53.7% of tasks collected from shell-script helping forums.

UR - http://www.scopus.com/inward/record.url?scp=85062327286&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85062327286&partnerID=8YFLogxK

U2 - 10.1142/S0218194019500098

DO - 10.1142/S0218194019500098

M3 - Article

VL - 29

SP - 197

EP - 220

JO - International Journal of Software Engineering and Knowledge Engineering

JF - International Journal of Software Engineering and Knowledge Engineering

SN - 0218-1940

IS - 2

ER -