GithubHelp home page GithubHelp logo

jqk6 / vasim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackwadden/vasim

0.0 1.0 0.0 7.39 MB

VASim is a virtual homogeneous non-deterministic finite automata automata simulator and transformation tool. VASim can parse, transform, simulate, and profile homogeneous NFAs, and is meant to be an open tool for automata processing research. VASim can also be extended to support hypothetical automata processing elements.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.83% C++ 97.33% Python 1.29% Shell 0.47% C 0.09%

vasim's Introduction

Virtual Automata Simulator (VASim)

VASim is a homogeneous non-deterministic finite automata simulator. Homogeneous automata do not contain epsilon transitions, and also have the property that all incoming transitions for a particular state have the same rule.

VASim can parse, transform, simulate, and profile homogeneous automata, and is meant to be an open tool for automata processing research. VASim can also be extended to support arbitrary automata processing elements other than traditional states.

Installation

VASim is designed to run on 64-bit machines GCC 4.9+. Users have successfully compiled on 32-bit platforms but these builds are not officially supported. Below are the commands used to install on all tested platforms.

Ubuntu Linux (14.04/16.04 with gcc 5.0+)

$ git clone https://github.com/jackwadden/VASim.git
$ cd VASim
$ make

MacOS (10.11+)

$ brew install nasm
$ brew install gcc5
$ git clone https://github.com/jackwadden/VASim.git
$ cd VASim
$ make

Windows 7 (Cygwin64)

Dependencies:

First you must install all required Cygwin64 software tools

C:\> chdir cygwin64
C:\cygwin64> move <path-to-setup-x86_64.exe> .
C:\cygwin64> setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel -P nasm

Once Cygwin64 is configured, VASim should compile correctly in a Cygwin terminal.

$ git clone https://github.com/jackwadden/VASim.git
$ cd VASim
$ make

Command Line Usage

VASim was developed to be used as a command line tool for automata simulation. VASim takes at least one input--an automata graph--and an optional input. If an input is provided, VASim will simulate the automata on the input.

$ vasim [options] <anml_file> [input_file]

Library Usage

VASim can also be used as a library to programmatically construct and simulate automata. An example program to make and simulate an automata with two states is shown below.

#include "automata.h"

#define FROM_INPUT_STRING false

using namespace std;

/*
 *
 */
int main(int argc, char * argv[]) {

    //
    Automata ap;

    STE *start = new STE("start", "[JACK]", "all-input");
    STE *stop = new STE("stop", "[JARED]", "none");
    stop->setReporting(true);

    // Add them to data structure
    ap.rawAddSTE(start);
    ap.rawAddSTE(stop);

    // Add edge between them
    ap.addEdge(start,stop);

    // Emit automata as anml file
    ap.automataToANMLFile("example.anml");
        
    // print out how many reports we've seen (this should be 0)
    cout << ap.getReportVector().size() << endl;

    // enable report gathering for the automata
    ap.enableReport();

    // initialize simulation
    ap.initializeSimulation();

    // simulate the automata on three inputs
    ap.simulate('J');
    ap.simulate('J');
    ap.simulate('J');

    // print out how many reports we've seen (this should be 2)
    cout << ap.getReportVector().size() << endl;

}

Issues

Please see https://www.github.com/jackwadden/VASim/issues for a list of known bugs or to create an issue ticket.

Citation

If you use VASim in a publication, please use the following citation:

Wadden, J., and Skadron, K. "VASim: An Open Virtual Automata Simulator for Automata Processing Application and Architecture Research." University of Virginia, Tech Report #CS2016-03, 2016.

@techreport{vasim,
    Author = {Wadden, Jack and Skadron, Kevin},
    Institution = {University of Virginia},
    Number = {CS2016-03},
    Title = {{VASim: An Open Virtual Automata Simulator for Automata Processing Application and Architecture Research}},
    Year = {2016}}

Acknowledgements

This work was started at the University of Virginia and was supported by the following organizations at some point in time: The ARCS Foundation, the National Science Foundation (CCF-1116673, CCF-1629450, EF-1124931), Micron Technologies, and the Center for Future Architectures Research (C-FAR), one of the six centers of STARnet, a Semiconductor Research Corporation program sponsored by MARCO and Darpa.

vasim's People

Contributors

jackwadden avatar kevinaangstadt avatar sr7cb avatar

Watchers

 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.