Added Example Rascal files

This commit is contained in:
Ahmad Salim Al-Sibahi
2016-11-29 23:37:34 +01:00
parent c87976330f
commit 4e6e58a099
4 changed files with 923 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
module Analyze
import Syntax;
set[Id] unreachable(Machine m) {
r = { <q1,q2> | (State)`state <Id q1> <Trans* ts>` <- m.states,
(Trans)`<Id _>: <Id q2>` <- ts }+;
qs = [ q.name | /State q := m ];
return { q | q <- qs, q notin r[qs[0]] };
}