Coder Social home page Coder Social logo

org/w3c/dom/ls/DocumentLS about jflap-lib HOT 4 OPEN

citiususc avatar citiususc commented on August 26, 2024 2
org/w3c/dom/ls/DocumentLS

from jflap-lib.

Comments (4)

sbrokal1 avatar sbrokal1 commented on August 26, 2024

Any solution to this?

from jflap-lib.

drelhaj avatar drelhaj commented on August 26, 2024

I'm running the bundle jar file wrapped in Python code see code below for testing an input and for testing equivalence for FSAs

#this method takes an input array and a jflap FSA machine
def testInput(input, machine):#input is an array e.g. input = ["abc","aabbcc"]
    from subprocess import Popen, PIPE, STDOUT
    from threading import Timer
    p = Popen(['java', '-jar', 'jflaplib-cli-1.3-bundle.jar', 'run', machine, input], stdout=PIPE, stderr=STDOUT)
    timer = Timer(10, p.kill)
    try:
        timer.start()#timeout in case of infinite loops
        for line in p.stdout:
            return line
        return 'false'
    finally:
        timer.cancel()
#check if one machine is equivalent to another
def checkEquivalence(machine1, machine2):
    from subprocess import Popen, PIPE, STDOUT
    from threading import Timer

    p = Popen(['java', '-jar', 'jflaplib-cli-1.3-bundle.jar', 'equivalent', machine1, machine2], stdout=PIPE, stderr=STDOUT)
    timer = Timer(10, p.kill)

    checkResult = ""
    try:
        timer.start()
        for line in p.stdout:
            checkResult = line
        return checkResult
    finally:
        timer.cancel()

from jflap-lib.

ushahid avatar ushahid commented on August 26, 2024

I have written a similar utility inspired by this repo, you can try it out here:

https://github.com/ushahid/jflap-cli

from jflap-lib.

Related Issues (4)

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.