Skip to content

axone-protocol/prolog

Repository files navigation

axone github banner

       

Axone Prolog Virtual Machine

build codecov GoDoc Go Report Card conventional commits Contributor Covenant license

Important

This repository is a hard fork of ichiban/prolog, customized to meet the specific requirements of the Axone protocol. It is maintained independently for our use case, and upstream updates may not be regularly integrated.

For the original, general-purpose Prolog implementation or to contribute to the broader community, please visit the ichiban/prolog repository.

What is this?

axone-protocol/prolog is a Prolog virtual machine written in Go, designed to be embedded in blockchain environments. It serves as the core of the Axone protocol for decentralized, logic-based smart contracts.

This project is a fork of the ichiban/prolog repository, striving to maintain ISO standard compliance where feasible while adapting to the unique constraints of blockchain execution.

Deviations from the ISO Standard

The following customizations have been made to adapt the original ichiban/prolog implementation to the blockchain environment:

  • Capped variable allocation to limit the number of variables.
  • Replaced maps with ordered maps to ensure deterministic execution.
  • Implemented secure integer arithmetic for functors.
  • Integrated cockroachdb/apd for floating-point arithmetic.
  • Removed support for trigonometric functions (sin, cos, tan, asin, acos, atan).
  • Introduced VM hooks for enhanced Prolog execution control.
  • Added support for the Dict term.
  • halt/0 and halt/1 are forbidden and will throw an error.

License

Distributed under the MIT license. See LICENSE for more information.

Bug reports & feature requests

If you notice anything not behaving how you expected, if you would like to make a suggestion or would like to request a new feature, please open a new issue. We appreciate any help you're willing to give!

Don't hesitate to ask if you are having trouble setting up your project repository, creating your first branch or configuring your development environment. Mentors and maintainers are here to help!

You want to get involved? 😍

So you want to contribute? Great! ❤️ We appreciate any help you're willing to give. Don't hesitate to open issues and/or submit pull requests.

We believe that collaboration is key to the success of the Axone project. Join our Community discussions on the Community space to:

  • Engage in conversations with peers and experts.
  • Share your insights and experiences with Axone.
  • Learn from others and expand your knowledge of the protocol.

The Community space serves as a hub for discussions, questions, and knowledge-sharing related to Axone. We encourage you to actively participate and contribute to the growth of our community.

Please check out Axone health files:

Acknowledgements

We would like to thank the following projects for their inspiration and for providing the foundation for this project:

  • ichiban for the original Prolog implementation.