swift-llvm-statistics-comparison

This repository contains microbenchmarks written in Swift and C++.

https://github.com/janniclas/swift-llvm-statistics-comparison

Science Score: 44.0%

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

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary

Keywords

cpp llvm-ir static-code-analysis swift
Last synced: 4 months ago · JSON representation ·

Repository

This repository contains microbenchmarks written in Swift and C++.

Basic Info
  • Host: GitHub
  • Owner: janniclas
  • License: mit
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 1.13 MB
Statistics
  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 3
Topics
cpp llvm-ir static-code-analysis swift
Created over 3 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Citation

README.md

Swift-based and C++-based LLVM IR Microbenchmark

MIT license

Overview

This repository contains microbenchmarks written in Swift and C++. They are meant to be compiled to LLVM IR and provide a baseline for the comparison of C++-based LLVM IR and Swift-based LLVM IR. This microbenchmark can be used to verify that static analysis tools that can analyze Swift or C++ also work with the other language.

Currently Available Tests

SwiftTests CppTests

Abstract

Since Swift’s introduction in 2014, it has become the default programming language for Apple’s rich ecosystem. However, despite its high adoption, there are only limited tools to help developers build secure applications. Developers came to expect and rely on such tools due to their high availability in other languages. Thus, their absence can lead to developers having low confidence in the correctness of their code and may result in insecure applications. In this thesis, we explore the possibility of using existing static analysis tools for C++-based LLVM IR to analyze Swift-based LLVM IR. We first examine how Swift’s language features are represented in LLVM IR. Therefore, we create a set of microbenchmarks based on Swift’s language features and compare the corresponding LLVM IR with semantically equivalent C++ programs. Secondly, we run PhASAR on a selection of the microbenchmarks and check the analysis result’s correctness. Based on this exploratory research, we understand the applicability of existing static analysis tools to Swift and get an overview of how we possibly must adapt PhASAR’s analyses to handle Swift.

forthebadge forthebadge

Owner

  • Name: Jan-Niclas Strüwer
  • Login: janniclas
  • Kind: user
  • Location: Paderborn
  • Company: Fraunhofer IEM

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this microbenchmark or the related software, please cite it as below."
authors:
- family-names: "Strüwer"
  given-names: "Jan-Niclas"
  orcid: "https://orcid.org/0000-0002-4876-3483"
title: "Microbenchmark for Swift-based and C++-based LLVM IR"
version: 1.0.0
# doi: 10.5281/zenodo.1234
date-released: 2023-02-20
url: "https://github.com/janniclas/swift-llvm-statistics-comparison"

GitHub Events

Total
Last Year

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 271
  • Total Committers: 1
  • Avg Commits per committer: 271.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jan-Niclas Struewer j****r@g****m 271

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

Dependencies

.github/workflows/swift.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/upload-artifact v3 composite
  • docker/login-action f054a8b539a109f9f41c372932f1ae047eff08c9 composite
  • softprops/action-gh-release v1 composite
ComparisonTool/Package.resolved swiftpm
  • github.com/apple/swift-argument-parser 1.2.0
  • github.com/apple/swift-log 1.4.4
ComparisonTool/Package.swift swiftpm
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestCliArgs/Package.resolved swiftpm
  • github.com/stephencelis/SQLite.swift 0.14.1
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestCliArgs/Package.swift swiftpm
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestMultiFile/Package.resolved swiftpm
  • github.com/stephencelis/SQLite.swift 0.14.1
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestMultiFile/Package.swift swiftpm
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestSimple/Package.resolved swiftpm
  • github.com/stephencelis/SQLite.swift 0.14.1
Swift-Package-Manager-Testsuite/SQLExecutableTaintTestSimple/Package.swift swiftpm
Swift-Package-Manager-Testsuite/SimpleLibraryLCATest/Package.swift swiftpm
Swift-Package-Manager-Testsuite/SimpleLibraryTaintTest/Package.swift swiftpm