citiususc / jflap-lib Goto Github PK
View Code? Open in Web Editor NEWAn improved version of JFLAP 7.0 to be used as a library as well as a command line tool.
License: Other
An improved version of JFLAP 7.0 to be used as a library as well as a command line tool.
License: Other
Whenever I load a Finite State Automaton:
FiniteStateAutomaton automaton = (FiniteStateAutomaton)new XMLCodec().decode(new File("something.jff"), null);
I get the following error:
java.lang.AssertionError
at edu.duke.cs.jflap.file.xml.AutomatonTransducer.addBlocks(AutomatonTransducer.java:217)
at edu.duke.cs.jflap.file.xml.AutomatonTransducer.readBlocks(AutomatonTransducer.java:483)
at edu.duke.cs.jflap.file.xml.AutomatonTransducer.readAutomaton(AutomatonTransducer.java:411)
at edu.duke.cs.jflap.file.xml.AutomatonTransducer.fromDOM(AutomatonTransducer.java:402)
at edu.duke.cs.jflap.file.XMLCodec.decode(XMLCodec.java:62)
at edu.duke.cs.jflap.file.XMLCodec.decode(XMLCodec.java:90)
at checker.nfa.NFABuilder.generateNFA(NFABuilder.java:17)
at checker.CheckerUtils.parseGroup(CheckerUtils.java:123)
at checker.CheckerUtils.readSettings(CheckerUtils.java:41)
at checker.CheckerUtils.readSettings(CheckerUtils.java:30)
at checker.CheckerUtils.loadCheckerSettings(CheckerUtils.java:24)
at checker.CheckerUtilsTests.setUp(CheckerUtilsTests.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
The FSA loads without problems with the assertion commented out.
Unfortunately, the maven dependency in the documentation doesn't work anymore. It should be:
<dependency>
<groupId>com.github.citiususc</groupId>
<artifactId>jflap-lib</artifactId>
<version>1.3</version>
</dependency>
TMSimulator.simulateInput()
always returns false because it is calling TMSimulator.isAccepted()
to check status. However, TMSimulator.isAccepted()
always returns false and even states in a comment that it only exists as a formality and is not meant to be called, as seen below.
TMSimulator.simulateInput():
TMSimulator.isAccepted():
I believe the line if (isAccepted())
should call TMConfiguration.isAccept()
instead of TMSimulator.isAccepted()
to properly check if TM input is accepted or not.
TMConfiguration.isAccept()
When I try to run the jar bundles with any FSA I always get the following error
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/ls/DocumentLS
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at org.apache.xerces.jaxp.DocumentBuilderImpl.(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
at edu.duke.cs.jflap.file.XMLCodec.decode(XMLCodec.java:59)
at edu.duke.cs.jflap.file.XMLCodec.decode(XMLCodec.java:90)
at es.usc.citius.jflap.cli.IO.loadAutomaton(IO.java:37)
at es.usc.citius.jflap.cli.CommandLine$RunInputCommand.run(CommandLine.java:79)
at es.usc.citius.jflap.cli.CommandLine$Cli.parseAndRun(CommandLine.java:136)
at es.usc.citius.jflap.cli.CommandLine.main(CommandLine.java:21)
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ls.DocumentLS
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 17 more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.