morazanm / fsm

A DSL for the Automata Theory Classroom
15 stars 6 forks source link

bug: PDA with `'nodead` supplied errors #71

Closed jschappel closed 1 year ago

jschappel commented 1 year ago

Describe the bug

When adding the 'nodead arg in for a pda the following error is returned. After looking at the the code for make-ndpda nodead should be allowed to be passed as a additional arg. However the code for make-unchecked-ndpda does not take in account the extra arg.

Returned Error:

/fsm-core/interface.rkt:420:13: make-unchecked-ndpda: arity mismatch;
 the expected number of arguments does not match the given number
  expected: 6
  given: 7

Steps to reproduce

  1. run the below machine
    #lang fsm
    ;; pda=2ba
    (make-ndpda '(S M1 F)
              '(a b)
              '(a b)
              'S
              '(F)
              `(((S ,EMP ,EMP) (M1 ,EMP))
                ((M1 a ,EMP) (M1 (a a)))
                ((M1 b ,EMP) (M1 (b)))
                ((M1 a (b)) (M1 (a)))
                ((M1 a (b b)) (M1 ,EMP))
                ((M1 b (a)) (M1 ,EMP))
                ((M1 ,EMP ,EMP) (F ,EMP)))
              'nodead)
morazanm commented 1 year ago

Removed optional argument from make-ndpda. There is no longer an adddead parameter. This is consistent with the FSM documentation.