Skip to content

Commit 92345cd

Browse files
committed
0.10.5 ready
2 parents 27cad35 + 7ec5024 commit 92345cd

File tree

58 files changed

+363
-268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+363
-268
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
/nbproject/
55
settings.xml
66
tst/results/*
7+
.vsCode

README.md

Lines changed: 12 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ a link to this page somewhere in the documentation/system about section.
2424
<dependency>
2525
<groupId>com.github.bthink-bgu</groupId>
2626
<artifactId>BPjs</artifactId>
27-
<version>0.10.0</version>
27+
<version>0.10.5</version>
2828
</dependency>
2929
...
3030
</dependencies>
@@ -44,97 +44,17 @@ a link to this page somewhere in the documentation/system about section.
4444

4545
## Change Log for the BPjs Library.
4646

47-
### 2019-03-30
48-
* :arrow_up: Improved state hashing
49-
* :arrow_up: More tests for the verifier
50-
* :sparkles: Proper JavaScript error reporting at runtime (e.g. invoking methods of `null`). (#52)
51-
* :sparkles: Proper JavaScript error reporting at for verification. To this end, a new violation, `JSErrorViolation`, was added. (#79)
52-
* :arrow_up: Updated error message when calling `bp.sync` from a non-b-thread context.
53-
54-
### 2019-03-29
55-
* :bug: Fixed a bug in the verifier, where a non-cyclic path ending in a visited node is not inspected.
56-
* :bug: Hash code fixes.
57-
* :arrow_up: Interface cleanups in the DfsBProgramVerifier: some method exposed the internal DFS nodes, and now they don't do that anymore.
58-
* :arrow_up: More tests
59-
60-
### 2019-03-10
61-
* :put_litter_in_its_place: Code cleanup.
62-
63-
### 2019-03-05
64-
* :sparkles: Serious makeover for the composable event suite. Users can no compose event sets using `or`,`and`, and `not` (and even `xor`, `nor` and `nand`) and get semantically correct sets that support verification.
65-
for example, this works:
66-
```java
67-
EventSet sutA = theEventSet(E_A).or(E_B).and( theEventSet(E_B).or(E_C) );
68-
EventSet sutB = theEventSet(E_C).or(E_B).and( theEventSet(E_B).or(E_A) );
69-
assertEquals( sutA, sutB );
70-
```
71-
* :arrow_up: `ComposableEventSet` refactored to have `equals` and `hashCode` that can hold during verification.
72-
* :arrow_up: More tests.
73-
74-
### 2019-02-10
75-
* :arrow_up: Improved hash functions for `ContinuationProgramState` (affects b-thread sync snapshots as well).
76-
77-
### 2019-02-10
78-
* :bug: Instances of the constant sets class `EventSets` now cannot be duplicated even when they are serialized.
79-
* :bug: Fixed a bug in the verifier, where inspections were invoked twice.
80-
* :arrow_up: Improved hash functions for `SyncStatement`s and `ComposableEventSet`s.
81-
* :arrow_up: `ExecutionTrace`s can now return the last event, in addition to returning the last state.
82-
* :arrow_up: More tests.
83-
* :put_litter_in_its_place: Removed duplicate functionality of "all events except" (had two classes that did this).
84-
* :arrow_up: More robust JavaScript error handling.
85-
86-
### 2019-02-10
87-
* :arrow_up: Updated the Tic-Tac-Toe code.
88-
* :put_litter_in_its_place: Removed dependencies from `pom.xml`
89-
* :arrow_up: Updated versions of dependencies in `pom.xml`.
90-
91-
### 2019-02-18
92-
* :arrow_up: More tests
93-
94-
### 2019-02-18
95-
* :sparkles: Detection of multiple violations/general program space traversal: `DFSBProgramVerifier` can continue its traversal of b-program state space after a violation was detected.
96-
* :arrow_up: Tests clean up after their executor services.
97-
* :arrow_up: More tests
98-
99-
### 2019-02-06
100-
* :arrow_up::arrow_up::sparkles: Verification areas refactored and generalized towards code reuse. Inspectors and traces are now general, and do not assume they were created from the DFS verifier.
101-
* :arrow_up: Improved state hashing algorithm in the hash-based visited state storage.
102-
* :arrow_up: Updated documentation of the verification parts.
103-
* :arrow_up: More tests.
104-
* :arrow_up: Updated maven compiler plugin.
105-
* :bug: Fixed a corner case where b-programs with immediate failed assertions would still attempt running certain machines.
106-
107-
### 2019-02-05
108-
* :arrow_up: :tada: Event selection strategies now accept `BProgramSyncSnapshot`, rather than a set of sync statements and external events.
109-
110-
### 2019-02-04
111-
* :sparkles: Testing infrastructure for execution traces.
112-
* :arrow_up: More terminology cleanups in the api (e.g. "bsync" converted to "sync")
113-
114-
### 2019-02-03
115-
* :arrow_up: `VisitedStateStore` now stores *states*, not DFS nodes. So it's more reusable that way.
116-
117-
### 2019-01-19
118-
* :sparkles: More tests.
119-
* :arrow_up: `BriefPrintDfsVerifierListener` => `PrintDfsVerifierListener`, so that it's consistent with `PrintBProgramRunnerListener`.
120-
* :arrow_up: Incorporated the "BPjs Tips" file to the central documentation.
121-
122-
### 2019-01-18
123-
* :bug: Fixed a that cause equality tests of JS event sets to return false negatives.
124-
* :bug: The `bp` object no longer collected by the state comparators.
125-
* :sparkles: `BEvent` has a bit more informative `toString()` method, that can also look abit into the JavaScript objects (not a full JSON.stringify, since we don't want to deal with arbirtarily large strings for a simple toString op. Not to mention circular references and such).
126-
* :sparkles: `BEvent::hashCode` now hashes data the event might have.
127-
* :sparkles: `ScriptableUtils` got some new utility methods that dig a bit into `ScriptableObject`s. This makes BPjs better at handling events with JS data objects.
128-
129-
### 2019-01-01
130-
* :arrow_up: Hot BThread Cycle now more informative (reporting event and index of return-to).
131-
* :sparkles: Commandline verifier accepts optional `--max-trace-length` parameter, that limits the trace length during verification.
132-
* :arrow_up: Removed the internal `scope` field from `BThreadSyncSnapshot`s. This cuts the size of the serialized form significantly.
133-
* :arrow_up: better hashing algorithm.
134-
* :tada: Happy new year - 2018 changes moved [here](changelof-2018.md).
135-
136-
137-
[Earlier Changes](changelog-2018.md)
47+
### 2020-04-22
48+
* :arrow_up: Updated to use Rhino 1.7.12
49+
* :arrow_up: :tada: Can use ES6 syntax, such as `let` and `const`.
50+
* No arrow functions yet, there are some issues with continuations and arrow functions.
51+
* :arrow_up: Synchronization statements are created more efficiently.
52+
* :bug: `ComposableEventSet` checks arguments on creation, so that it can't be instantiated with `null` events (this later causes NPEs).
53+
* :bug: `PrioritizedBThread` ESS fixed ([#70](https://github.com/bThink-BGU/BPjs/issues/70).
54+
* :put_litter_in_its_place: Various small code clean-ups.
55+
* :put_litter_in_its_place: Removed extraneous dependencies from `pom.xml`
56+
57+
[Earlier Changes](changelog-2019.md)
13858

13959
Legend:
14060
* :arrows_counterclockwise: Change

changelog-2019.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Changelog for 2019
2+
3+
### 2019-08-23
4+
* :arrow_up: Improved and updated documentation, especially regarding analysis, verification, and general top-level views (life cycle, classes, packages).
5+
* :arrow_up: Improved tests package structure, so that it's less confusing.
6+
7+
### 2019-03-30
8+
* :arrow_up: Improved state hashing
9+
* :arrow_up: More tests for the verifier
10+
* :sparkles: Proper JavaScript error reporting at runtime (e.g. invoking methods of `null`). (#52)
11+
* :sparkles: Proper JavaScript error reporting at for verification. To this end, a new violation, `JSErrorViolation`, was added. (#79)
12+
* :arrow_up: Updated error message when calling `bp.sync` from a non-b-thread context.
13+
14+
### 2019-03-29
15+
* :bug: Fixed a bug in the verifier, where a non-cyclic path ending in a visited node is not inspected.
16+
* :bug: Hash code fixes.
17+
* :arrow_up: Interface cleanups in the DfsBProgramVerifier: some method exposed the internal DFS nodes, and now they don't do that anymore.
18+
* :arrow_up: More tests
19+
20+
### 2019-03-10
21+
* :put_litter_in_its_place: Code cleanup.
22+
23+
### 2019-03-05
24+
* :sparkles: Serious makeover for the composable event suite. Users can no compose event sets using `or`,`and`, and `not` (and even `xor`, `nor` and `nand`) and get semantically correct sets that support verification.
25+
for example, this works:
26+
```java
27+
EventSet sutA = theEventSet(E_A).or(E_B).and( theEventSet(E_B).or(E_C) );
28+
EventSet sutB = theEventSet(E_C).or(E_B).and( theEventSet(E_B).or(E_A) );
29+
assertEquals( sutA, sutB );
30+
```
31+
* :arrow_up: `ComposableEventSet` refactored to have `equals` and `hashCode` that can hold during verification.
32+
* :arrow_up: More tests.
33+
34+
### 2019-02-10
35+
* :arrow_up: Improved hash functions for `ContinuationProgramState` (affects b-thread sync snapshots as well).
36+
37+
### 2019-02-10
38+
* :bug: Instances of the constant sets class `EventSets` now cannot be duplicated even when they are serialized.
39+
* :bug: Fixed a bug in the verifier, where inspections were invoked twice.
40+
* :arrow_up: Improved hash functions for `SyncStatement`s and `ComposableEventSet`s.
41+
* :arrow_up: `ExecutionTrace`s can now return the last event, in addition to returning the last state.
42+
* :arrow_up: More tests.
43+
* :put_litter_in_its_place: Removed duplicate functionality of "all events except" (had two classes that did this).
44+
* :arrow_up: More robust JavaScript error handling.
45+
46+
### 2019-02-10
47+
* :arrow_up: Updated the Tic-Tac-Toe code.
48+
* :put_litter_in_its_place: Removed dependencies from `pom.xml`
49+
* :arrow_up: Updated versions of dependencies in `pom.xml`.
50+
51+
### 2019-02-18
52+
* :arrow_up: More tests
53+
54+
### 2019-02-18
55+
* :sparkles: Detection of multiple violations/general program space traversal: `DFSBProgramVerifier` can continue its traversal of b-program state space after a violation was detected.
56+
* :arrow_up: Tests clean up after their executor services.
57+
* :arrow_up: More tests
58+
59+
### 2019-02-06
60+
* :arrow_up::arrow_up::sparkles: Verification areas refactored and generalized towards code reuse. Inspectors and traces are now general, and do not assume they were created from the DFS verifier.
61+
* :arrow_up: Improved state hashing algorithm in the hash-based visited state storage.
62+
* :arrow_up: Updated documentation of the verification parts.
63+
* :arrow_up: More tests.
64+
* :arrow_up: Updated maven compiler plugin.
65+
* :bug: Fixed a corner case where b-programs with immediate failed assertions would still attempt running certain machines.
66+
67+
### 2019-02-05
68+
* :arrow_up: :tada: Event selection strategies now accept `BProgramSyncSnapshot`, rather than a set of sync statements and external events.
69+
70+
### 2019-02-04
71+
* :sparkles: Testing infrastructure for execution traces.
72+
* :arrow_up: More terminology cleanups in the api (e.g. "bsync" converted to "sync")
73+
74+
### 2019-02-03
75+
* :arrow_up: `VisitedStateStore` now stores *states*, not DFS nodes. So it's more reusable that way.
76+
77+
### 2019-01-19
78+
* :sparkles: More tests.
79+
* :arrow_up: `BriefPrintDfsVerifierListener` => `PrintDfsVerifierListener`, so that it's consistent with `PrintBProgramRunnerListener`.
80+
* :arrow_up: Incorporated the "BPjs Tips" file to the central documentation.
81+
82+
### 2019-01-18
83+
* :bug: Fixed a that cause equality tests of JS event sets to return false negatives.
84+
* :bug: The `bp` object no longer collected by the state comparators.
85+
* :sparkles: `BEvent` has a bit more informative `toString()` method, that can also look abit into the JavaScript objects (not a full JSON.stringify, since we don't want to deal with arbirtarily large strings for a simple toString op. Not to mention circular references and such).
86+
* :sparkles: `BEvent::hashCode` now hashes data the event might have.
87+
* :sparkles: `ScriptableUtils` got some new utility methods that dig a bit into `ScriptableObject`s. This makes BPjs better at handling events with JS data objects.
88+
89+
### 2019-01-01
90+
* :arrow_up: Hot BThread Cycle now more informative (reporting event and index of return-to).
91+
* :sparkles: Commandline verifier accepts optional `--max-trace-length` parameter, that limits the trace length during verification.
92+
* :arrow_up: Removed the internal `scope` field from `BThreadSyncSnapshot`s. This cuts the size of the serialized form significantly.
93+
* :arrow_up: better hashing algorithm.
94+
* :tada: Happy new year - 2018 changes moved [here](changelog-2018.md).
95+
96+
97+
[Earlier Changes](changelog-2018.md)
98+
99+
Legend:
100+
* :arrows_counterclockwise: Change
101+
* :sparkles:New feature
102+
* :put_litter_in_its_place: Deprecation
103+
* :arrow_up: Upgrade
104+
* :bug: Bug fix

dependency-reduced-pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.github.bthink-bgu</groupId>
55
<artifactId>BPjs</artifactId>
66
<name>BPjs</name>
7-
<version>0.10.2</version>
7+
<version>0.10.3</version>
88
<description>Provides runtime and analysis for behavioral programs written in
99
JavaScript. It can run stand-alone (from the commmandline) or be
1010
embedded in larger JVM-based systems.</description>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
====================
2+
Packages and Classes
3+
====================
4+
5+
BPjs is divided into three main parts, following from its leading principle that b-programs are really models, which can be executed just as well as analysed. Thus, the package structure (shown below) is divided into:
6+
7+
``model``
8+
Contains core BP concepts, such as BProgram and BEvent.
9+
10+
``analysis``
11+
Contains classes required for analyzing a b-program.
12+
13+
``execution``
14+
Contains classes for executing b-programs.
15+
16+
17+
.. figure:: images/class-diagram.png
18+
:align: center
19+
20+
Main classes and packages of BPjs.
21+
22+
23+
BPjs contains other packages as well, but they are technical in nature:
24+
25+
``bprogramio``
26+
Deals with storing and loading b-program state.
27+
28+
``mains``
29+
Command-line applications and utilities. Some of the classes in this package may grow up to become full-fledged applications, and leave to their own repository.
30+
31+
``exceptions``
32+
Holds exceptions related to BPjs.

0 commit comments

Comments
 (0)