From 787971b6980f565dea86e7a9ecca5878ccba95fb Mon Sep 17 00:00:00 2001 From: Thijs Molendijk Date: Fri, 15 Apr 2022 00:57:24 +0200 Subject: [PATCH] Add missing declarations to concurrent solver migration instructions --- docs/howtos/statix/migrating-to-concurrent-solver.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/howtos/statix/migrating-to-concurrent-solver.md b/docs/howtos/statix/migrating-to-concurrent-solver.md index a31dbdac5..5d0d35c33 100644 --- a/docs/howtos/statix/migrating-to-concurrent-solver.md +++ b/docs/howtos/statix/migrating-to-concurrent-solver.md @@ -83,6 +83,16 @@ rules query type filter P* I* and { x' :- x' == x } in s |-> [(_, (_, T))]. + +rules + withType : TYPE -> scope + typeOf : scope -> TYPE + + withType(T) = s :- + new s, !typeOf[T] in s. + + typeOf(s) = T :- + query typeOf filter e in s |-> [(_, T)]. ``` We now discuss the changes one-by-one. First, the signature of relation `type`