Giter VIP home page Giter VIP logo

r-doz / soga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bistrulli/soga

0.0 0.0 0.0 230.21 MB

License: GNU General Public License v3.0

Shell 0.10% JavaScript 0.02% Ruby 0.01% C++ 92.98% Python 0.61% Perl 0.03% C 3.93% Objective-C 0.01% Scala 0.01% Fortran 1.25% R 0.12% C# 0.03% Assembly 0.33% Ada 0.05% XSLT 0.32% CSS 0.01% Pascal 0.04% ANTLR 0.01% Objective-C++ 0.01% Cuda 0.20%

soga's Introduction

SOGA

Contents

  • The folder "experiments" contains the scripts and data to reproduce the main results of of the paper (i.e., Table 3).
  • The folder "grammars" contains the file with the grammar of SOGA (SOGA.g4) and the two sub-grammars ASGMT (ASGMT.g4) and TRUNC (TRUNC.g4).
  • The folder "programs" contains the scripts of the models analyzed in the paper, divided by tools.
  • The folder "src" contains the code implementing the tool SOGA, whose usage is described below;
  • The folder "tools" contains the implementation of the tools AQUA, BLOG, cmdstan and PSI, to which SOGA is compared.

Implementation

The module producecfg.py contains the classes definition for CFG objects and the function produce_cfg, that extracts a CFG from a program script in a .txt file.

The module libSOGA.py contains the function start_soga, which is used to invoke SOGA on a CFG object and the recursive function SOGA, which, depending on the type of the visited node, calls the functions needed to update the current distribution.

Such functions are contained in the auxiliary modules:

  • libSOGAtruncate.py, containing functions for computing the resulting distribution when a truncation occurs (in conditional or observe instructions);
  • libSOGAupdate.py, containing functions for computing the resulting distribution after applying an assignment instruction;
  • libSOGAmerge,py, containing functions for computing the resulting distribution when a merge or a prune instruction is encountered;

Additional functions for general purpose are defined in the module libSOGAshared.py, which is imported by all previous libraries.

Parsing of the scripts, expressions and truncations is performed using ANTLR. Definition of the respective grammars can be found in the files SOGA.g4, ASGMT.g4 and TRUNC.g4.

soga's People

Contributors

frarandone avatar bistrulli avatar

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.