Skip to content

This is code for the paper: Policy Safety Testing in Non-Deterministic Planning: Fuzzing, Test Oracles, Fault Analysis, Proceedings of the 28th European Conference on Artificial Intelligence (ECAI'25)

License

Notifications You must be signed in to change notification settings

neuroexplicit-saar/2025-ecai-action-policy-safety-testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlaJA

Repository of the PlaJA (Planning in JANI) code base.

Input

Models are to be provided in the automata-based input langauge JANI.
Neural networks (where applicable) are to be provided in NNet format.
Additionally, the policy learning module uses the PyTorch format (.pt).
The interface between a JANI model and a neural network is to be documented in Jani2NNet format. Tree ensemble policies are to be provided in JSON format.

Dependencies

PlaJA uses the nlohmann JSON library for parsing JANI inputs.
The predicate abstraction module (and other SMT modules) depend on Z3 and a modified version of Marabou.
Marabou depends on Boost & CxxTest and (optionally) OpenBLAS & Gurobi. (Using both is the only configuration actively maintained though.)
The policy learning module depends on PyTorch's C++ distribution LibTorch. To support tree ensemble policies, Veritas is required. For BDD based computations, CUDD is required.

PlaJA has been successfully build & run with the following versions of the dependencies listed above (on Linux and MacOS):

Building

The code base is built using CMake. See CMakeLists.txt and DependenciesConfig.cmake for configuration. Most notably, in the former you can enable/disable modules. This makes sense, if you are not willing to install dependencies of modules not required for your purposes. For instance, if the policy learning functionality is not needed, then you can disable it such that you do not have to install PyTorch.

Consider using cmake.sh, which allows to specify a build type (Release, Debug, ...) and a build directory. It will use "CodeBlocks - Unix Makefiles". You then have to run make in the respective build directory. Alternatively, you might adapt the scripts to, e.g., use Ninja. Here, you have to run ninja in the respective directory.

The cmake infrastructure has been successfully tested on Linux and MacOS.

Running

After building the PlaJA executable can be found in the respective source directory.

To see basic commandline options you can run

./PlaJA --help

If you additionally set the engine option then commandline options specific to that engine will be provided. For instance,

./PlaJA --help --engine FAULT_ANALYSIS

will additionally output the commandline options specific to the BMC engine.

A basic usage of PlaJA would be

./PlaJA --model-file model.jani --engine EXPLORER 

For property-based engines it might make sense to pick a specific property. For instance,

./PlaJA --model-file model.jani --prop 1 --engine BFS

will run BFS for the property with index 1 in the JANI properties array.
Additionally, PlaJA supports additional properties provided in an additional-properties-file which is used for fault analysis

./PlaJA --model-file model.jani --additional-properties additional_properties.jani --prop 1 --engine FAULT_ANALYSIS

The additional properties file must contain a single JSON object composed of a JANI properties array. PlaJA will treat this array as an extension of the properties array in the model file (if present).

To call PlaJA for FaultAnalysis, please use

./PlaJA --engine FAULT_ANALYSIS --help

References & Credits

PlaJA implements a basic search engine infrastructure adapting an extract of a stripped Fast Downward code base (non-public).

The probabilistic search module is an adaption of the Probabilistic Fast Downward implementation.

The successor generation has been designed under the impression of PRISM.

To allow disabling the Marabou dependency when SMT support is not required, there is a reimplementation of Marabou's neural network parsing functionality.
Moreover, for customization purposes, PlaJA also adapts Marabou's input query generation.

Some auxiliary classes are plain Fast Downward imports, while other adapt from similar routines Fast Downward and Marabou.

For further notes see the reference files in the respective directories.

LICENSE

PlaJA is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

PlaJA is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

About

This is code for the paper: Policy Safety Testing in Non-Deterministic Planning: Fuzzing, Test Oracles, Fault Analysis, Proceedings of the 28th European Conference on Artificial Intelligence (ECAI'25)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published