pipe main [] |> unit {
|> Printnl <| ["hello, world!"];
}
Platypus is a language designed to combine a safety-first ownership model and a developer friendly syntax. The intention is to enforce memory-safe development practices and perform all necessary memory management at compile time.
Rust, the largest presence in this domain, is a low-level systems language that can be difficult to understand for a user who is used to higher-level ones. The goal of Platypus is to act as an intermediary between these two.
-k
→ persist intermediary files (*.o
, *.bc
) generated during compilation
usage: ./platypus -c -k ./test/test_cases/compile/pos_hello_world.ppus
-v
→ enable verbose compilation output
usage: ./platypus -c -v ./test/test_cases/compile/pos_hello_world.ppus
-o
→ enable compiler optimizations
usage: ./platypus -c -o ./test/test_cases/compile/pos_hello_world.ppus
check out some examples here!
For all test types, the testing program will validate the output of
a compiler command on a .ppus
input file matches the expected output -- the desired output can be found in the .out
file for each test. For integration tests, we use llvm's executionengine to fetch this output (-e
) to avoid the maintenance of auxiliary files during the usual compilation process (-c
). If a program can't be compiled, the stderr output of the compiler command will be compared to the desired output.
for a more in-depth overview of the language, its features, and implementation, take a look at the LRM!