ciselab / rpc-json-testing

0 stars 1 forks source link

Create basic evolutionary algorithm #4

Closed lisv closed 3 years ago

lisv commented 3 years ago

Following the meeting on the 30th of October

Steps:

  1. Connect to JSON-RPC API and being able to send request (individuals in the population) -> Currently possible for Ripple
  2. Represent genes -> Now done in this way: https://ibb.co/r7z0xVT
  3. Generate population -> stuck :( cannot find complete specification of rippled methods
  4. Next population (crossover and mutate)
  5. Evaluate population (ranking) -> for first version will be done by looking at HTTP response codes only (and encouraging diversity), the contents of the response is however also important, e.g. 200 requests with error messages could potentially be very relevant (look at later)
  6. Loop (new populations) until convergence/stopping criteria in Main method
lisv commented 3 years ago

Links to some (incomplete?) specification for Ripple JSON-RPC API:

The layout however makes it not easy to automatically get an overview of all methods and corresponding params. How do I get such an overview to use as a basis for the population generation?

EvoMaster (https://github.com/EMResearch/EvoMaster/blob/master/docs/blackbox.md) performs black-box testing by using the schema of APIs, which are available for various REST APIs in the OpenAPI directory (swagger format). Unfortunately, I could not find something like this yet for RPC APIs.

There is something similar for RPC (OpenRPC: https://spec.open-rpc.org/) but this format is not yet used (not by Ripple and probably not by many others either as it seems quite new).

apanichella commented 3 years ago

I would suggest starting with something simple, like the hill climber or (mu, lambda)-Evolutionary Algorithm. These algorithms use only the mutation operator and no crossover. The crossover could be a bit complicated in this case.

lisv commented 3 years ago

Following the meeting on the 12th of November

lisv commented 3 years ago

Update

lisv commented 3 years ago

Update