/BPjs

Environment for running behavioral programs written in JavaScript.

Primary LanguageJavaMIT LicenseMIT

BPjs: A JavaScript-based Behavioral Programming Runtime.

This repository contains a javascript-based BP library.

Build Status Coverage Status Maven Central Documentation Status JavaDocs

License

  • BPjs is open sourced under the MIT license. If you use it in a system, please provide a link to this page somewhere in the documentation/system about section.
  • BPjs uses the Mozilla Rhino JavaScript engine. Project page and source code can be found here.

Academic Citation

If you use BPjs in an academic work, please consider citing it as:

Bar-Sinai M., Weiss G. (2021) Verification of Liveness and Safety Properties of Behavioral Programs Using BPjs. In: Margaria T., Steffen B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Tools and Trends. ISoLA 2020. Lecture Notes in Computer Science, vol 12479. Springer, Cham. https://doi.org/10.1007/978-3-030-83723-5_14

bibtex


Getting BPjs

  • For Maven projects: Add BPjs as dependency. Note that the version number changes.
<dependencies>
    ...
    <dependency>
        <groupId>com.github.bthink-bgu</groupId>
        <artifactId>BPjs</artifactId>
        <version>0.12.3</version>
    </dependency>
    ...
</dependencies>

Documentation

Change Log for the BPjs Library.

2023-09

  • ✨ EventSets now have an except method, that allows removal of events from the set. e.g. allMotionEvents.except(moveDownEvent). (#218)
  • ⬆️ Improved error messages when composing event sets.

2023-08

  • 〽️ BPjsCodeEvaluationException is now have one general constructor for all rhino exception(#200)
  • 🐛 BProgramRunnerListenerAdapter is now doing what adapters should do (create empty implementation for abstract classes and interfaces) and does not print on errors anymore. (#119).

2023-06

  • ⬆️ Printouts and toStrings of JavaScript compound values (e.g. arrays) adhere to normative JavaScript style. That is, no more [JS_Array 1,2,3], just [1,2,3]. Java objects still retain their J_ prefix.(#213).

2023-05

  • ⬆️ Upgraded dependencies.
  • ⬆️ MapProxy's seed is now protected, so client code can use it directly (#206).
  • ✨ Dedicated exceptions for calling bp.sync and bp.thread outside of a bthread. (#195, #203)
  • 〽️ BpLog is now an interface, and it's implementation can be changed by calling BProgram.setLogger. (#208)
  • ✨ BPjs' version is now available at runtime, using BPjs.getVersion(). (#136)
  • ✨ BPjs' logger is now is now supporting bp.log.error. (#175)

Earlier Changes

Legend:

  • 🔄 Change
  • ✨ New feature
  • 🎉 New feature, but more exciting
  • 〽️ Refactor (turns out this sign is called "part alternation mark" and not "weird 'M'", so it fits).
  • 🚮 Deprecation
  • ⬆️ Upgrade
  • 🐛 Bug fix