This repository contains a javascript-based BP library.
- 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.
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
- 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>
- Clone, fork, or download the starting project.
- Download the
.jar
files directly from Maven Central. - The project's Google group
- Devoxx Belgium 2018 talk introducing Behavioral Programming and BPjs.
- Presentations: Introduction Deeper dive
- Tutorial and Reference
- API Javadocs
- ✨ 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.
- 〽️
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).
- ⬆️ Printouts and
toString
s 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 theirJ_
prefix.(#213).
- ⬆️ Upgraded dependencies.
- ⬆️
MapProxy
's seed is nowprotected
, so client code can use it directly (#206). - ✨ Dedicated exceptions for calling
bp.sync
andbp.thread
outside of a bthread. (#195, #203) - 〽️
BpLog
is now an interface, and it's implementation can be changed by callingBProgram.setLogger
. (#208) - ✨ BPjs' version is now available at runtime, using
BPjs.getVersion()
. (#136) - ✨ BPjs' logger is now is now supporting
bp.log.error
. (#175)
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