Coder Social home page Coder Social logo

mitm's Introduction

MitM

A GAP package for annotating functions with their expected output filters.

##What it can do This package is a library that can be used to automatically determine the output types of functions containing calls to the 'Objectify'-function. it currently returns output in about 50% of the cases in the library.

Additionally there is a prototype-implementation for annotating constructors to created objects. This is however quite rudimentary and one should rather use the version available on the 'PrintConstructors'-branch on the 'gap'-fork of LiftnLearn.

###How it works The findObjectify-files are responsible for finding all Objectify-calls in a given set of files/functions. It returns an object that collects relevant information per set of declaration and implementation files.

Based on this object the produceDeclaration files then produces a declaration- file that is wrapping the respective functions and passes the detected output- filters in the arguments of the declaration. These are currently not used.

##What it can't do It can't determine the output type of Objectify-calls whose results depend on values that are only determined on runtime.

It currently also cannot handle if there are multiple Objectify-calls within one and the same function, i.e. when they are occuring within conditional statements.

In any of those cases it will return an IsObject-filter for the function. There is currently no distinction between recognizing IsObject as the actual result filter of a function and returning IsObject due to a lack of better information.

There is also no useful output for global functions installed using InstallGlobalFunctions (it is always the empty list printed).

##Bugs No bugs are currently known.

##How to use At first the package should be loaded into a running GAP-session.

LoadPackage("MitM");

One can then pass the names of a .gi and respective .gd file to the declareOperationsCaller-function as implemented in lib/produceDeclaration.gd and an output-path for the resulting header-file.

For example: declareOperationsCaller("json_output/grp.gd.json", "json_output/grp.gi.json", "declarationsForGroups.gd");

The function however expects that the GAP-files have already been precompiled to the JSON-format using the JSON-compiler.

mitm's People

Contributors

schmollf avatar

Watchers

 avatar

Forkers

markuspf

mitm's Issues

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.