master-thesis

πŸ“„ My Master's Thesis in Computer Science, written at the Norwegian University of Science and Technology (NTNU)

https://github.com/andstor/master-thesis

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • β—‹
    Academic publication links
  • β—‹
    Academic email domains
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (8.5%) to scientific vocabulary

Keywords

blockchain code-generation latex machine-learning master-thesis ntnu smart-contract transformer
Last synced: 6 months ago · JSON representation

Repository

πŸ“„ My Master's Thesis in Computer Science, written at the Norwegian University of Science and Technology (NTNU)

Basic Info
Statistics
  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
blockchain code-generation latex machine-learning master-thesis ntnu smart-contract transformer
Created about 4 years ago · Last pushed over 3 years ago
Metadata Files
Readme Citation

README.md

Secure Smart Contract Code Synthesis with Transformer Models

Abstract

Writing Smart Contracts (SCs) are hard. Writing secure SCs is even harder. Automatic code generation is by many considered the holy grail in the field of computer science. Recent advances in transformer models have shown great potential in the area of synthesizing code from code comments. However, it is just as important how these models are best put to use. In this thesis, it is investigated: how to automatically generate Smart Contract code with transformer-based language models, by inputting comments to guide the code generation? Due to the monetary and immutable nature of blockchain, security in SCs is of uttermost importance. This thesis also investigates: how to generate secure Smart Contract code with transformer-based language models? A design science research approach is adopted for answering these research questions. For automatically synthesizing SC code, the 6 billion parameter model GPT-J by EleutherAI is fine-tuned on SC code. For this task, the currently largest dataset of real SC code is constructed, containing 186,397 contracts. To evaluate the comment-aid approach to generate code, the original code was used as the ground truth. This code was then compared with the generated code, and their differences were measured using the BiLingual Evaluation Understudy (BLEU) score. Results of the evaluation show that this approach results in a BLEU score of 0.557, which is beyond the state-of-the-art. For generating secure Smart Contract code with transformer-based language models, a novel method named security conditioning is proposed. From both automatic and manual evaluation of the technique, the evaluation results show that security conditioning produced secure code.

Building document locally

A Makefile is provided for building the document locally. This requires a LaTeX compiler, such as texlive, installed locally, which has to provide the commands pdflatex and biber.

FAQ

If sources produces an error, try running rm -rf `biber --cache`

Owner

  • Name: AndrΓ© Storhaug
  • Login: andstor
  • Kind: user
  • Location: Trondheim πŸ‡³πŸ‡΄
  • Company: NTNU

πŸŽ“ CS PhD student @ Norwegian University of Science and Technology (NTNU)

GitHub Events

Total
Last Year

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels