rename project to gflap, update readme
Some checks failed
test / test (push) Has been cancelled

This commit is contained in:
Yuri Tatishchev 2025-03-03 15:49:07 -08:00
parent 1deb18ef22
commit d2907bb2e1
Signed by: CaZzzer
GPG Key ID: 28BE602058C08557
5 changed files with 43 additions and 41 deletions

View File

@ -1,6 +1,8 @@
# glemt # GFLAP
Computational theory automata, work in progress. Computational theory automata built with Gleam, work in progress.
Inspired by [JFLAP](https://www.jflap.org/)
## Development ## Development

View File

@ -1,4 +1,4 @@
name = "glemt" name = "gflap"
version = "1.0.0" version = "1.0.0"
# Fill out these fields if you intend to generate HTML documentation or publish # Fill out these fields if you intend to generate HTML documentation or publish

View File

@ -140,7 +140,7 @@ pub fn ends_with_b() -> NFA {
} }
pub fn main() { pub fn main() {
io.println("Hello from glemt!") io.println("Hello from gflap!")
let automaton = even_a() let automaton = even_a()
let _ = io.debug(is_dfa(automaton)) let _ = io.debug(is_dfa(automaton))

37
test/gflap_test.gleam Normal file
View File

@ -0,0 +1,37 @@
import gflap
import gleeunit
import gleeunit/should
pub fn main() {
gleeunit.main()
}
pub fn nfa_even_a_test() {
gflap.even_a()
|> gflap.check_string("")
|> should.equal(True)
gflap.even_a()
|> gflap.check_string("a")
|> should.equal(False)
gflap.even_a()
|> gflap.check_string("aa")
|> should.equal(True)
gflap.even_a()
|> gflap.check_string("aaa")
|> should.equal(False)
gflap.even_a()
|> gflap.check_string("aaaa")
|> should.equal(True)
gflap.even_a()
|> gflap.check_string("aab")
|> should.equal(False)
gflap.even_a()
|> gflap.check_string("baabaa")
|> should.equal(False)
}

View File

@ -1,37 +0,0 @@
import glemt
import gleeunit
import gleeunit/should
pub fn main() {
gleeunit.main()
}
pub fn nfa_even_a_test() {
glemt.even_a()
|> glemt.check_string("")
|> should.equal(True)
glemt.even_a()
|> glemt.check_string("a")
|> should.equal(False)
glemt.even_a()
|> glemt.check_string("aa")
|> should.equal(True)
glemt.even_a()
|> glemt.check_string("aaa")
|> should.equal(False)
glemt.even_a()
|> glemt.check_string("aaaa")
|> should.equal(True)
glemt.even_a()
|> glemt.check_string("aab")
|> should.equal(False)
glemt.even_a()
|> glemt.check_string("baabaa")
|> should.equal(False)
}