NotBad4U / osl

An Operational Semantics for memory ownership

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Ownership System Language (OSL)

Build Status

Introduction

The Ownership System Language (OSL) aims to detect memory usage vulnerability such as data-race, double-free and use-after-free in C programs, through ownership system. The Ownership is a set of rules that governs how a program must manages memory.

Currently, our system does not require manual notations on the C program analyzed. Ownership type systems could require considerable annotation overhead, which is a significant burden for users. The core of the tool is develop with the K-Framework, a rewrite-based executable semantic framework.

Run OSL

You can find the build instructions in the document INSTALL.md.

You can run the OSL CLI by running the command:

cargo run -- <program.c> 

The optios available are:

USAGE:
    osl [FLAGS] [OPTIONS] <input>

FLAGS:
    -h, --help         Prints help information
    -k, --keep         Save temporary transpiled file
    -t, --transpile    Only run the transpiler
    -V, --version      Prints version information
    -v, --verbose      Use verbose output

OPTIONS:
    -o, --output <output>    Output C transpiled file

ARGS:
    <input>    Input C file

Project structure

  • model, which contains all the source code of OSLos
  • cfrontend, which contains all the source code of OSLτ
  • src, which provides the source code of the CLI of OSL binary. It pipe OSLτ and OSLos.
  • tests, which contains a stack of tests that can be run automaticaly.
  • Documentation, which is used to store doc files and draft publication.

Development

You can find tests of the semantics in the folder: model/tests. Use them to control breaking changes and help in the development.

The integration tests can be find in the folder tests.

The unit tests for OSLτ can be find in the folder cfrontend/tests.

About

An Operational Semantics for memory ownership


Languages

Language:OCaml 61.9%Language:Rust 13.1%Language:C 10.5%Language:Standard ML 5.8%Language:TeX 2.5%Language:Makefile 1.4%Language:SMT 1.1%Language:Coq 1.0%Language:Shell 0.7%Language:Python 0.7%Language:CSS 0.3%Language:Batchfile 0.3%Language:Haskell 0.3%Language:Dockerfile 0.2%Language:RenderScript 0.2%Language:Brainfuck 0.1%Language:Beef 0.1%Language:VBScript 0.0%