Implemented package imports

This commit is contained in:
2024-07-18 18:08:30 +02:00
parent fa373e7dc2
commit b34470a97d
21 changed files with 510 additions and 353 deletions

@ -1,37 +1,35 @@
import sys
main() {
x := 0
if x != x && x != x {
exit(1)
sys.exit(1)
}
if x == x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x == x {
exit(1)
sys.exit(1)
}
if x == x && x != x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x == x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x != x && x == x {
exit(1)
sys.exit(1)
}
if x == x && x == x && x == x {
exit(0)
sys.exit(0)
}
exit(1)
}
exit(x) {
syscall(60, x)
sys.exit(1)
}

@ -1,47 +1,45 @@
import sys
main() {
x := 0
if x == x && x != x || x != x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x == x || x != x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x != x || x == x && x != x {
exit(1)
sys.exit(1)
}
if x != x && x != x || x != x && x == x {
exit(1)
sys.exit(1)
}
if (x == x || x != x) && (x != x || x != x) {
exit(1)
sys.exit(1)
}
if (x != x || x == x) && (x != x || x != x) {
exit(1)
sys.exit(1)
}
if (x != x || x != x) && (x == x || x != x) {
exit(1)
sys.exit(1)
}
if (x != x || x != x) && (x != x || x == x) {
exit(1)
sys.exit(1)
}
if (x == x && x != x || x == x && x == x) && (x == x && x == x || x == x && x != x) {
if (x != x || x == x) && (x != x || x != x) || (x == x || x != x) && (x != x || x == x) {
exit(0)
sys.exit(0)
}
}
exit(1)
}
exit(x) {
syscall(60, x)
sys.exit(1)
}

@ -1,12 +1,14 @@
import sys
main() {
x := 0
if x != x || x != x {
exit(1)
sys.exit(1)
}
if x != x || x != x || x != x {
exit(1)
sys.exit(1)
}
if x == x || x != x {
@ -14,16 +16,12 @@ main() {
if x == x || x != x || x != x {
if x != x || x == x || x != x {
if x != x || x != x || x == x {
exit(0)
sys.exit(0)
}
}
}
}
}
exit(1)
}
exit(x) {
syscall(60, x)
sys.exit(1)
}

@ -1,75 +1,73 @@
import sys
main() {
x := 0
if x != 0 {
exit(1)
sys.exit(1)
}
if x > 0 {
exit(1)
sys.exit(1)
}
if x < 0 {
exit(1)
sys.exit(1)
}
if 0 != x {
exit(1)
sys.exit(1)
}
if 0 > x {
exit(1)
sys.exit(1)
}
if 0 < x {
exit(1)
sys.exit(1)
}
if x >= 1 {
exit(1)
sys.exit(1)
}
if 1 <= x {
exit(1)
sys.exit(1)
}
if x + 1 != x + 1 {
exit(1)
sys.exit(1)
}
if x + 1 != inc(x) {
exit(1)
sys.exit(1)
}
if x - 1 != dec(x) {
exit(1)
sys.exit(1)
}
if inc(x) != x + 1 {
exit(1)
sys.exit(1)
}
if dec(x) != x - 1 {
exit(1)
sys.exit(1)
}
if x != inc(dec(x)) {
exit(1)
sys.exit(1)
}
if inc(dec(x)) != x {
exit(1)
sys.exit(1)
}
if x == 0 {
exit(0)
sys.exit(0)
}
exit(1)
}
exit(x) {
syscall(60, x)
sys.exit(1)
}
inc(x) {

@ -1,9 +1,7 @@
main() {
exit(f(1) + f(2) + f(3))
}
import sys
exit(code) {
syscall(60, code)
main() {
sys.exit(f(1) + f(2) + f(3))
}
f(x) {

@ -1,3 +1,5 @@
import sys
main() {
x := 10
@ -175,13 +177,13 @@ main() {
fail()
}
exit(0)
success()
}
fail() {
exit(1)
sys.exit(1)
}
exit(code) {
syscall(60, code)
success() {
sys.exit(0)
}

@ -1,9 +1,7 @@
main() {
exit(f(f(f(1))))
}
import sys
exit(code) {
syscall(60, code)
main() {
sys.exit(f(f(f(1))))
}
f(x) {