Files
regorus/tests/scheduler/analyzer/basic.yaml
Anand Krishnamoorthi 7789de41b6 Statement Scheduler Implementation
Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2023-04-09 20:28:59 -07:00

46 lines
981 B
YAML

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
cases:
- note: basic
modules:
- |
package test
x = y {
p = 1
# var can appear on rhs
2 = q
y = p
# No local var is created for r
r = 1
# Nested scope
x := [ k |
a = k
# A loop index var with same name as parent scope.
# The outer var is used.
[1,2,3][idx]
r1 = { q |
# := forces a local variable
rrr = t
q := [1, 2, 3][idx1]
}
]
[a, [b]] = [[p], q]
# an index var
[1,2, 3][idx]
}
r = 1
rrr = "fun"
scopes:
- locals: ["p", "y", "q", "x", "a", "b", "idx"]
inputs: ["r", "rrr"]
- locals: ["k", "r1"]
inputs: ["a", "idx", "rrr"]
- locals: ["q", "idx1", "t"]
inputs: ["rrr"]