aiken/examples/benchmarks
KtorZ 5b0a1716b5
Fix mk_starts and second_last in knights benchmarks.
mk_starts was not yielding enough values. It's originally a translation of a double list comprehension in Haskell, which cannot simply be translated to a map2. The latter combine elements two by two, but the former works through all possible permutations.
2024-07-17 12:52:29 +02:00
..
.github/workflows commit new example for benchmarking 2024-07-17 12:52:28 +02:00
lib/benchmarks Fix mk_starts and second_last in knights benchmarks. 2024-07-17 12:52:29 +02:00
.gitignore commit new example for benchmarking 2024-07-17 12:52:28 +02:00
README.md commit new example for benchmarking 2024-07-17 12:52:28 +02:00
aiken.lock Review knights benchmark and update dependencies. 2024-07-17 12:52:29 +02:00
aiken.toml Review knights benchmark and update dependencies. 2024-07-17 12:52:29 +02:00
plutus.json commit new example for benchmarking 2024-07-17 12:52:28 +02:00

README.md

benchmarks

Write validators in the validators folder, and supporting functions in the lib folder using .ak as a file extension.

For example, as validators/always_true.ak

validator {
  fn spend(_datum: Data, _redeemer: Data, _context: Data) -> Bool {
    True
  }
}

Building

aiken build

Testing

You can write tests in any module using the test keyword. For example:

test foo() {
  1 + 1 == 2
}

To run all tests, simply do:

aiken check

To run only tests matching the string foo, do:

aiken check -m foo

Documentation

If you're writing a library, you might want to generate an HTML documentation for it.

Use:

aiken docs

Resources

Find more on the Aiken's user manual.