Giter Site home page Giter Site logo

libsl-extractor's Introduction

LibSL descriptions extractor

This tool provides an automatic way to extract semantic information from JVM libraries. This information is represented by .lsl files written in LibSL (library specification language).

Implementing the new stage

Analyzing stages are atomic steps of specification extracting. To implement new one, you should:

  1. Create new gradle submodule in module stages (via the IDE or manually) readme-images/img.png
  2. Implement the interface AnalysisStage:
    class MyStage : AnalysisStage {
        override val name: String = "My Awesome Stage"
    
        override fun run(analysisContext: GlobalAnalysisContext) {
            // analysis logic
        }
    }
  3. Add your analysis stage to the integration tests pipeline. You can do it in file TestPlatform, in PipelineConfig {} lambdas.

Tests

The testdata (files to be compiled and used in tests) are located here. You can add new packages like existing ones. Also, you can add any dependencies to gradle (see build.gradle.kts) and use it as a testdata.

After the new testdata was added, you should add a corresponding test-function to Tests.kt. You can use this file for examples.

Examples of APIs usage

The main APIs are kfg and LibSL Parser API. The first one provides API to work with JVM bytecode. The second one provides API to work with LibSL code: get info from it and update its structure. For examples and docs of LibSL parser visit its readme.

You can find an example of stage in stages:lsl-class-reader module. This module builds the framework of the processing library. This framework represents by LibSL parser's Tree. This module shows how to create new nodes such as types, automata, functions, contexts, etc.

Module stages:assign-analysis demonstrates how to use information from ASG: how to map entities from kfg to LibSL nodes, how to resolve functions and automata and other.

libsl-extractor's People

Contributors

vldf avatar

Watchers

 avatar

Forkers

kechinvv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.