Wignesh / cedar-spec

Definitional implementation of Cedar language and utilities for DRT

Home Page:https://www.cedarpolicy.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cedar Specification

This repository contains the Dafny formalization of Cedar and infrastructure for performing differential randomized testing (DRT) between the formalization and Rust production implementation available in cedar.

Repository Structure

  • cedar-spec contains the Dafny formalization of, and proofs about, Cedar.
  • cedar-dafny-java-wrapper contains the Java interface for DRT.
  • cedar-drt contains code for input generation, fuzzing, property-based testing, and differential testing of Cedar.
  • cedar is a git submodule, pinned to the main branch of cedar.

Build

To build the Dafny formalization and proofs:

  • Install Dafny 4.0, following the instructions here. Our proofs expect Z3 version 4.12.1, so if you have another copy of Z3 installed locally, you may need to adjust your PATH.
  • cd cedar-dafny && make

To build the DRT framework:

  • Install Dafny, following the instructions above
  • ./build.sh

Run

To run DRT:

  • cd cedar-drt && source ./set_env_vars.sh
  • cargo fuzz run -s none <target> -j8 (choose an appropriate -j for your machine).

List the available fuzz targets with cargo fuzz list. Available targets are described in the README in the cedar-drt directory.

Additional commands available with cargo fuzz help.

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

About

Definitional implementation of Cedar language and utilities for DRT

https://www.cedarpolicy.com

License:Apache License 2.0


Languages

Language:Rust 50.3%Language:Dafny 45.9%Language:Java 2.8%Language:Makefile 0.5%Language:Dockerfile 0.2%Language:Shell 0.2%