tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

NomDernier commitDate
bench/Tests: format handler-pool lifecycle and benchmark fixtures (#329)il y a 1 sem.
compare/Fmt: reformat the repository (ADR 0059 rev. 9)il y a 3 sem.
run/std/file/stream: open files read and written in chunks (ADR 0087)il y a 5 j
stress/Codegen: a CPR worker's call consumes its arguments when unwinding (#477)il y a 5 j
ui/Lists: a spread keeps its place in a list literal (#448)il y a 5 j
README.mdstd/io: read standard input line by line (#479, ADR 0086)il y a 5 j
README.MD

Test programs

DirectoryWhatRun by
run/Programs with their expected output. Each runs interpreted and natively (differential testing), and natively must leave no live heap block.louise_interp/tests/run.rs, louise_codegen_c/tests/native.rs
ui/Programs with expected diagnostics and types (format in louise_db/tests/ui.rs). After a change that moves lines (the formatter, a parser change), re-place the //~ markers with LOUISE_UI_BLESS=1 cargo test -p louise_db --test ui, then check the diff by hand.louise_db/tests/ui.rs
stress/Actor programs built optimised and run on several scheduler threads.scripts/stress.sh
bench/Benchmarks, each printing a checksum (README).scripts/bench.sh
compare/The same small programs in Louise, Rust, Haskell, Java, JavaScript and Python, for the README's comparison.scripts/compare.sh

A change that must not alter what the compiler produces (a refactor) is checked with scripts/same-output.sh BASE: it builds louise at the revision BASE and from the working tree, and compares, for every program in run/, stress/, bench/ and the examples, the diagnostics, the Core with and without the optimiser, and the generated C in one unit and in three.

Expected output

A program in run/, stress/ or bench/ states what it must do in comments:

  • //> text: the program prints the line text. The lines are expected in order, and nothing else may be printed on standard output. One space after //> is dropped; //> alone expects an empty line.
  • //! panic: message: after printing the expected lines, the program stops with a panic whose message is message. Without it, the program must end normally.
  • //@ small-stack: the program runs with a small stack: 256 KiB natively (LOUISE_STACK_KIB), 10,000 frames in the interpreter (LOUISE_INTERP_MAX_FRAMES, where going deeper panics with "stack overflow"). For programs that check their deep recursion runs in constant stack: the default stacks (1 GiB natively) would hide the difference.

A program in run/ reads <name>.stdin beside it as its standard input, on both backends (louise_testkit::stdin_of); without one, its input is empty. The file is bytes as they are (.gitattributes): CRLF, no final newline.

The Rust harnesses read them with louise_testkit::Expectations. The scripts read only //> lines, and only at the start of a line.