BPjs
BPjs copied to clipboard
Environment for running behavioral programs written in JavaScript.
BPjs: A JavaScript-based Behavioral Programming Runtime.
This repository contains a javascript-based BP library.
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>
- Clone, fork, or download the starting project.
- Download the
.jarfiles directly from Maven Central. - The project's Google group
Documentation
- Devoxx Belgium 2018 talk introducing Behavioral Programming and BPjs.
- Presentations: Introduction Deeper dive
- Tutorial and Reference
- API Javadocs
Change Log for the BPjs Library.
2023-09
- :sparkles: EventSets now have an
exceptmethod, that allows removal of events from the set. e.g.allMotionEvents.except(moveDownEvent). (#218) - :arrow_up: Improved error messages when composing event sets.
2023-08
- :part_alternation_mark:
BPjsCodeEvaluationExceptionis now have one general constructor for all rhino exception(#200) - :bug:
BProgramRunnerListenerAdapteris now doing what adapters should do (create empty implementation for abstract classes and interfaces) and does not print on errors anymore. (#119).
2023-06
- :arrow_up: 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 theirJ_prefix.(#213).
2023-05
- :arrow_up: Upgraded dependencies.
- :arrow_up:
MapProxy's seed is nowprotected, so client code can use it directly (#206). - :sparkles: Dedicated exceptions for calling
bp.syncandbp.threadoutside of a bthread. (#195, #203) - :part_alternation_mark:
BpLogis now an interface, and it's implementation can be changed by callingBProgram.setLogger. (#208) - :sparkles: BPjs' version is now available at runtime, using
BPjs.getVersion(). (#136) - :sparkles: BPjs' logger is now is now supporting
bp.log.error. (#175)
Earlier Changes
Legend:
- :arrows_counterclockwise: Change
- :sparkles: New feature
- :tada: New feature, but more exciting
- :part_alternation_mark: Refactor (turns out this sign is called "part alternation mark" and not "weird 'M'", so it fits).
- :put_litter_in_its_place: Deprecation
- :arrow_up: Upgrade
- :bug: Bug fix
