Skip to content

Conversation

@francastagna
Copy link
Collaborator

@francastagna francastagna commented Dec 2, 2025

PR Summary

We implemented the DynaMOSA many‑objective search algorithm, wired it into EvoMaster core, and added a graph‑based instrumentation pipeline that builds control dependence graphs (CDGs) and exposes them to the algorithm via a lightweight DTO and remote protocol.


Pseudocode:

image

Source: https://www.researchgate.net/publication/313164878_Automated_Test_Case_Generation_as_a_Many-Objective_Optimisation_Problem_with_Dynamic_Selection_of_the_Targets


Main Changes

  • New DynaMOSA algorithm (DynaMosaAlgorithm)

    • Adds a many‑objective search algorithm that uses a dynamic focus set of targets per generation instead of optimizing all objectives at once.
    • Periodically pulls new CDGs from the driver and updates its focus set based on uncovered targets.
  • Branch dependency graph and multi‑criteria manager

    • BranchDependencyGraph builds a lightweight DAG of branch objectives from ControlDependenceGraphDto (roots, children, and all objectives).
    • MulticriteriaManager keeps track of covered/uncovered branch targets and computes the current focus set by combining CDG roots with uncovered children; falls back to all uncovered targets when needed.
  • Instrumentation: CFG/CDG construction and export

    • Extends the Java agent with CFG/CDG support (EvoMasterGraph, CFG and CDG classes, GraphPool) that computes per‑method CDGs from bytecode.
    • Introduces ControlDependenceGraphDto (objectives, root ids, edges) as the minimal, serialized view of a CDG sent from the agent to core.
    • Adds DynamosaConfig flags and controller hooks (InstrumentationController, AgentController) to enable/disable graph construction and to stream CDG snapshots incrementally.
  • Core / driver wiring

    • Updates EMConfig and Main so Algorithm.DYNAMOSA is available and correctly instantiated for REST, GraphQL, RPC, and web‑frontend problems.
    • Extends the Java driver controllers and remote API to:
      • Start a new search (resetting coverage and CDG export state on the agent).
      • Push DynaMOSA‑specific configuration (graph flags) and pull batches of ControlDependenceGraphDto objects used to maintain the branch dependency graph in core.

@francastagna francastagna changed the title Feature/dynamosa 3 Dynamosa Algorithm Dec 5, 2025
@francastagna francastagna marked this pull request as ready for review December 5, 2025 15:14
@francastagna francastagna requested a review from arcuri82 December 5, 2025 16:25
@arcuri82
Copy link
Collaborator

@francastagna unfortunately due to sickness, had to skip some work this week. and now rest of the week i ll be fully in meetings. i doubt i ll have any time to look at this PR this week.
@jgaleotti have you already given feedback to @francastagna on the work for this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants