Skip to content

Determinism #3

@TravisLEBLANC1

Description

@TravisLEBLANC1

We need to check for determinism, meaning that the matches must not have intersecting pattern.

let rec choice(n) = match n with 
  | Nil -> Eps  
  | Cons(a,m) -> match m with 
    | Nil -> a 
    | Cons(b,bs) -> choice(m)
    | Cons(b,bs) -> a  (* non determinism*)

this should be rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions