From e3fd477c5ec98e3bcdcb5ef4ccbc8634efd11a14 Mon Sep 17 00:00:00 2001 From: gsv Date: Wed, 10 Jan 2024 18:38:21 +0300 Subject: [PATCH] Huge refactoring of pretrainng data generation. --- VSharp.API/VSharp.cs | 4 +- VSharp.API/VSharpOptions.cs | 8 +- VSharp.Explorer/AISearcher.fs | 27 +- VSharp.Explorer/Explorer.fs | 15 +- VSharp.Explorer/Options.fs | 2 +- VSharp.Explorer/Statistics.fs | 2 + VSharp.IL/CFG.fs | 34 +- VSharp.IL/Serializer.fs | 170 +++---- VSharp.ML.GameServer.Runner/Main.fs | 133 +++-- VSharp.ML.GameServer/Maps.fs | 707 +++++++++++++-------------- VSharp.ML.GameServer/Messages.fs | 56 ++- VSharp.SILI/CILState.fs | 22 +- VSharp.Test/Benchmarks/Benchmarks.cs | 2 +- VSharp.Test/IntegrationTests.cs | 2 +- 14 files changed, 626 insertions(+), 558 deletions(-) diff --git a/VSharp.API/VSharp.cs b/VSharp.API/VSharp.cs index 1601a38aa..6ce19efcf 100644 --- a/VSharp.API/VSharp.cs +++ b/VSharp.API/VSharp.cs @@ -190,8 +190,8 @@ private static Statistics StartExploration( oracle: options.Oracle, coverageToSwitchToAI:options.CoverageToSwitchToAI, stepsToPlay:options.StepsToPlay, - serialize:false, - pathToSerialize:""); + serialize:options.Serialize, + mapName:options.MapName); var fuzzerOptions = new FuzzerOptions( diff --git a/VSharp.API/VSharpOptions.cs b/VSharp.API/VSharpOptions.cs index b557a6e11..7a0e35a4e 100644 --- a/VSharp.API/VSharpOptions.cs +++ b/VSharp.API/VSharpOptions.cs @@ -114,6 +114,8 @@ public readonly record struct VSharpOptions public readonly Oracle? Oracle = null; public readonly uint CoverageToSwitchToAI = 0; public readonly uint StepsToPlay = 0; + public readonly string MapName = ""; + public readonly bool Serialize = false; /// /// Symbolic virtual machine options. @@ -145,7 +147,9 @@ public VSharpOptions( uint stepsLimit = DefaultStepsLimit, Oracle? oracle = null, uint coverageToSwitchToAI = 0, - uint stepsToPlay = 0) + uint stepsToPlay = 0, + string mapName = "", + bool serialize = false) { Timeout = timeout; SolverTimeout = solverTimeout; @@ -162,6 +166,8 @@ public VSharpOptions( Oracle = oracle; CoverageToSwitchToAI = coverageToSwitchToAI; StepsToPlay = stepsToPlay; + MapName = mapName; + Serialize = serialize; } /// diff --git a/VSharp.Explorer/AISearcher.fs b/VSharp.Explorer/AISearcher.fs index 796f5db19..d8713cc40 100644 --- a/VSharp.Explorer/AISearcher.fs +++ b/VSharp.Explorer/AISearcher.fs @@ -5,13 +5,7 @@ open VSharp open VSharp.IL.Serializer open VSharp.ML.GameServer.Messages -type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, serialize:bool, stepsToPlay:uint, pathToSerialize:string) = - let folderToStoreSerializationResult = getFolderToStoreSerializationResult pathToSerialize - let fileForExpectedResults = getFileForExpectedResults folderToStoreSerializationResult - do - if serialize - then - System.IO.File.AppendAllLines(fileForExpectedResults, ["GraphID ExpectedStateNumber ExpectedRewardForCoveredInStep ExpectedRewardForVisitedInstructionsInStep TotalReachableRewardFromCurrentState"]) +type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, stepsToPlay:uint) = let mutable lastCollectedStatistics = Statistics() let mutable (gameState:Option) = None let mutable useDefaultSearcher = coverageToSwitchToAI > 0u @@ -51,19 +45,16 @@ type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, serialize:bo part1.ToArray() |> Array.map (fun s -> State(s.Id - , s.Position - , s.PredictedUsefulness + , s.Position , s.PathConditionSize , s.VisitedAgainVertices , s.VisitedNotCoveredVerticesInZone , s.VisitedNotCoveredVerticesOutOfZone + , s.StepWhenMovedLastTime + , s.InstructionsVisitedInCurrentBlock , s.History , s.Children |> Array.filter activeStates.Contains) ) - - - - gameState <- Some <| GameState (vertices.ToArray(), states, edges.ToArray()) @@ -97,7 +88,7 @@ type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, serialize:bo then if Seq.length availableStates > 0 then - let gameStateDelta,_ = collectGameStateDelta serialize + let gameStateDelta = collectGameStateDelta () updateGameState gameStateDelta let statistics = computeStatistics gameState.Value Application.applicationGraphDelta.Clear() @@ -107,7 +98,7 @@ type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, serialize:bo elif Seq.length availableStates = 0 then None else - let gameStateDelta,_ = collectGameStateDelta serialize + let gameStateDelta = collectGameStateDelta () updateGameState gameStateDelta let statistics = computeStatistics gameState.Value if isInAIMode() @@ -122,11 +113,7 @@ type internal AISearcher(coverageToSwitchToAI: uint, oracle:Oracle, serialize:bo let x,y = oracle.Predict gameState.Value x * 1u, y afterFirstAIPeek <- true - let state = availableStates |> Seq.tryFind (fun s -> s.internalId = stateId) - if serialize - then - dumpGameState (System.IO.Path.Combine(folderToStoreSerializationResult , string firstFreeEpisodeNumber)) serialize - saveExpectedResult fileForExpectedResults stateId lastCollectedStatistics statistics + let state = availableStates |> Seq.tryFind (fun s -> s.internalId = stateId) lastCollectedStatistics <- statistics stepsPlayed <- stepsPlayed + 1u match state with diff --git a/VSharp.Explorer/Explorer.fs b/VSharp.Explorer/Explorer.fs index 5bd1cb96d..a16e2d2bd 100644 --- a/VSharp.Explorer/Explorer.fs +++ b/VSharp.Explorer/Explorer.fs @@ -27,10 +27,9 @@ type private IExplorer = abstract member StartExploration: (Method * state) list -> (Method * string[] * state) list -> Task type private SVMExplorer(explorationOptions: ExplorationOptions, statistics: SVMStatistics, reporter: IReporter) = - - let mutable stepsCount = 0 - let options = explorationOptions.svmOptions - + let options = explorationOptions.svmOptions + let folderToStoreSerializationResult = + getFolderToStoreSerializationResult explorationOptions.outputDirectory.FullName options.mapName let hasTimeout = explorationOptions.timeout.TotalMilliseconds > 0 let solverTimeout = @@ -79,7 +78,7 @@ type private SVMExplorer(explorationOptions: ExplorationOptions, statistics: SVM let rec mkForwardSearcher mode = let getRandomSeedOption() = if options.randomSeed < 0 then None else Some options.randomSeed match mode with - | AIMode -> AISearcher(options.coverageToSwitchToAI, options.oracle.Value, options.serialize, options.stepsToPlay, options.pathToSerialize) :> IForwardSearcher + | AIMode -> AISearcher(options.coverageToSwitchToAI, options.oracle.Value, options.stepsToPlay) :> IForwardSearcher | BFSMode -> BFSSearcher() :> IForwardSearcher | DFSMode -> DFSSearcher() :> IForwardSearcher | ShortestDistanceBasedMode -> ShortestDistanceBasedSearcher statistics :> IForwardSearcher @@ -340,7 +339,11 @@ type private SVMExplorer(explorationOptions: ExplorationOptions, statistics: SVM (* TODO: checking for timeout here is not fine-grained enough (that is, we can work significantly beyond the timeout, but we'll live with it for now. *) while not isStopped && not <| isStepsLimitReached() && not <| isTimeoutReached() && pick() do - stepsCount <- stepsCount + 1 + if options.serialize + then + dumpGameState (System.IO.Path.Combine(folderToStoreSerializationResult, string firstFreeEpisodeNumber)) + firstFreeEpisodeNumber <- firstFreeEpisodeNumber + 1 + if shouldReleaseBranches() then releaseBranches() match action with diff --git a/VSharp.Explorer/Options.fs b/VSharp.Explorer/Options.fs index eeb63c09e..a531ca8c0 100644 --- a/VSharp.Explorer/Options.fs +++ b/VSharp.Explorer/Options.fs @@ -54,7 +54,7 @@ type SVMOptions = { coverageToSwitchToAI: uint stepsToPlay: uint serialize: bool - pathToSerialize: string + mapName: string } type explorationModeOptions = diff --git a/VSharp.Explorer/Statistics.fs b/VSharp.Explorer/Statistics.fs index bc8533c6a..4eea81074 100644 --- a/VSharp.Explorer/Statistics.fs +++ b/VSharp.Explorer/Statistics.fs @@ -13,6 +13,7 @@ open FSharpx.Collections open VSharp open VSharp.Core open VSharp.Interpreter.IL +open VSharp.ML.GameServer.Messages open VSharp.Utils open CilState @@ -160,6 +161,7 @@ type public SVMStatistics(entryMethods : Method seq, generalizeGenericsCoverage member x.TrackStepForward (s : cilState) (ip : instructionPointer) = stepsCount <- stepsCount + 1u + s.stepWhenMovedLastTime <- stepsCount * 1u Logger.traceWithTag Logger.stateTraceTag $"{stepsCount} FORWARD: {s.internalId}" let setCoveredIfNeeded (loc : codeLocation) = diff --git a/VSharp.IL/CFG.fs b/VSharp.IL/CFG.fs index 45ae1ec84..a41aeccab 100644 --- a/VSharp.IL/CFG.fs +++ b/VSharp.IL/CFG.fs @@ -59,6 +59,8 @@ type internal temporaryCallInfo = {callee: MethodWithBody; callFrom: offset; ret type BasicBlock (method: MethodWithBody, startOffset: offset, id:uint) = let mutable finalOffset = startOffset + let mutable containsCall = false + let mutable containsThrow = false let mutable startOffset = startOffset let mutable isGoal = false let mutable isCovered = false @@ -108,6 +110,14 @@ type BasicBlock (method: MethodWithBody, startOffset: offset, id:uint Method, callFrom, returnTo)) currentBasicBlock.FinalOffset <- callFrom + currentBasicBlock.ContainsThrow <- true let newBasicBlock = makeNewBasicBlock returnTo addEdge currentBasicBlock newBasicBlock dfs' newBasicBlock returnTo k @@ -513,8 +524,10 @@ and IGraphTrackableState = abstract member VisitedNotCoveredVerticesInZone: uint with get abstract member VisitedNotCoveredVerticesOutOfZone: uint with get abstract member VisitedAgainVertices: uint with get - abstract member History: Dictionary - abstract member Children: array + abstract member InstructionsVisitedInCurrentBlock : uint with get, set + abstract member History: Dictionary + abstract member Children: array + abstract member StepWhenMovedLastTime: uint with get module public CodeLocation = @@ -594,9 +607,12 @@ type ApplicationGraph(getNextBasicBlockGlobalId,applicationGraphDelta:Applicatio if stateWithNewPosition.History.ContainsKey stateWithNewPosition.CodeLocation.BasicBlock then if initialPosition.BasicBlock <> stateWithNewPosition.CodeLocation.BasicBlock - then stateWithNewPosition.History[stateWithNewPosition.CodeLocation.BasicBlock] - <- stateWithNewPosition.History[stateWithNewPosition.CodeLocation.BasicBlock] + 1u - else stateWithNewPosition.History.Add(stateWithNewPosition.CodeLocation.BasicBlock, 1u) + then + let history = stateWithNewPosition.History[stateWithNewPosition.CodeLocation.BasicBlock] + stateWithNewPosition.History[stateWithNewPosition.CodeLocation.BasicBlock] + <- StateHistoryElem(stateWithNewPosition.CodeLocation.BasicBlock.Id, history.NumOfVisits + 1u, stateWithNewPosition.StepWhenMovedLastTime) + else stateWithNewPosition.InstructionsVisitedInCurrentBlock <- stateWithNewPosition.InstructionsVisitedInCurrentBlock + 1u + else stateWithNewPosition.History.Add(stateWithNewPosition.CodeLocation.BasicBlock, StateHistoryElem(stateWithNewPosition.CodeLocation.BasicBlock.Id, 1u, stateWithNewPosition.StepWhenMovedLastTime)) stateWithNewPosition.CodeLocation.BasicBlock.VisitedInstructions <- max stateWithNewPosition.CodeLocation.BasicBlock.VisitedInstructions @@ -613,9 +629,11 @@ type ApplicationGraph(getNextBasicBlockGlobalId,applicationGraphDelta:Applicatio //let added = applicationGraphDelta.TouchedStates.Add newState let added = applicationGraphDelta.TouchedBasicBlocks.Add newState.CodeLocation.BasicBlock let added = newState.CodeLocation.BasicBlock.AssociatedStates.Add newState - if newState.History.ContainsKey newState.CodeLocation.BasicBlock - then newState.History[newState.CodeLocation.BasicBlock] <- newState.History[newState.CodeLocation.BasicBlock] + 1u - else newState.History.Add(newState.CodeLocation.BasicBlock, 1u) + if newState.History.ContainsKey newState.CodeLocation.BasicBlock + then + let history = newState.History[newState.CodeLocation.BasicBlock] + newState.History[newState.CodeLocation.BasicBlock] <- StateHistoryElem(newState.CodeLocation.BasicBlock.Id, history.NumOfVisits + 1u, newState.StepWhenMovedLastTime) + else newState.History.Add(newState.CodeLocation.BasicBlock, StateHistoryElem(newState.CodeLocation.BasicBlock.Id, 1u, newState.StepWhenMovedLastTime)) newState.CodeLocation.BasicBlock.VisitedInstructions <- max newState.CodeLocation.BasicBlock.VisitedInstructions diff --git a/VSharp.IL/Serializer.fs b/VSharp.IL/Serializer.fs index a4f9cd4be..fc3c5d44f 100644 --- a/VSharp.IL/Serializer.fs +++ b/VSharp.IL/Serializer.fs @@ -2,6 +2,7 @@ module VSharp.IL.Serializer open System open System.Collections.Generic +open System.IO open System.Reflection open System.Text.Json open Microsoft.FSharp.Collections @@ -158,7 +159,7 @@ let calculateStateMetrics interproceduralGraphDistanceFrom (state:IGraphTrackabl else 0.0 else 0.0 - let historyLength = state.History |> Seq.fold (fun cnt kvp -> cnt + kvp.Value) 0u + let historyLength = state.History |> Seq.fold (fun cnt kvp -> cnt + kvp.Value.NumOfVisits) 0u let getMinBy cond = let s = distances |> Seq.filter cond @@ -173,16 +174,13 @@ let calculateStateMetrics interproceduralGraphDistanceFrom (state:IGraphTrackabl StateMetrics(state.Id, nextInstructionIsUncoveredInZone, childNumber, visitedVerticesInZone, historyLength , distanceToNearestUncovered, distanceToNearestNotVisited, distanceToNearestReturn) -let getFolderToStoreSerializationResult suffix = - let folderName = "SerializedEpisodes_for_" + suffix - if System.IO.Directory.Exists folderName - then System.IO.Directory.Delete(folderName,true) - let _ = System.IO.Directory.CreateDirectory folderName +let getFolderToStoreSerializationResult (prefix:string) suffix = + let prefix = Path.Combine(Path.GetDirectoryName prefix, "SerializedEpisodes") + let folderName = Path.Combine(prefix, suffix) + if Directory.Exists folderName + then Directory.Delete(folderName, true) + let _ = Directory.CreateDirectory folderName folderName - -let getFileForExpectedResults folderToStoreSerializationResult = - let path = System.IO.Path.Combine(folderToStoreSerializationResult, "expectedResults.txt") - path let computeStatistics (gameState:GameState) = let mutable coveredVerticesInZone = 0u @@ -216,36 +214,69 @@ let computeStatistics (gameState:GameState) = Statistics(coveredVerticesInZone,coveredVerticesOutOfZone,visitedVerticesInZone,visitedVerticesOutOfZone,visitedInstructionsInZone,touchedVerticesInZone,touchedVerticesOutOfZone, totalVisibleVerticesInZone) -let collectGameState (basicBlocks:ResizeArray) (serialize: bool) = +let collectStatesInfoToDump (basicBlocks:ResizeArray) = + let statesMetrics = ResizeArray<_>() + for currentBasicBlock in basicBlocks do + let interproceduralGraphDistanceFrom = Dictionary>() + currentBasicBlock.AssociatedStates + |> Seq.iter (fun s -> statesMetrics.Add (calculateStateMetrics interproceduralGraphDistanceFrom s)) + + let statesInfoToDump = + let mutable maxVisitedVertices = UInt32.MinValue + let mutable maxChildNumber = UInt32.MinValue + let mutable minDistToUncovered = UInt32.MaxValue + let mutable minDistToNotVisited = UInt32.MaxValue + let mutable minDistToReturn = UInt32.MaxValue + + statesMetrics + |> ResizeArray.iter (fun s -> + if s.VisitedVerticesInZone > maxVisitedVertices + then maxVisitedVertices <- s.VisitedVerticesInZone + if s.ChildNumber > maxChildNumber + then maxChildNumber <- s.ChildNumber + if s.DistanceToNearestUncovered < minDistToUncovered + then minDistToUncovered <- s.DistanceToNearestUncovered + if s.DistanceToNearestNotVisited < minDistToNotVisited + then minDistToNotVisited <- s.DistanceToNearestNotVisited + if s.DistanceToNearestReturn < minDistToReturn + then minDistToReturn <- s.DistanceToNearestReturn + ) + let normalize minV v (sm:StateMetrics) = + if v = minV || (v = UInt32.MaxValue && sm.DistanceToNearestReturn = UInt32.MaxValue) + then 1.0 + elif v = UInt32.MaxValue + then 0.0 + else float (1u + minV) / float (1u + v) + + statesMetrics + |> ResizeArray.map (fun m -> StateInfoToDump (m.StateId + , m.NextInstructionIsUncoveredInZone + , if maxChildNumber = 0u then 0.0 else float m.ChildNumber / float maxChildNumber + , if maxVisitedVertices = 0u then 0.0 else float m.VisitedVerticesInZone / float maxVisitedVertices + , float m.VisitedVerticesInZone / float m.HistoryLength + , normalize minDistToReturn m.DistanceToNearestReturn m + , normalize minDistToUncovered m.DistanceToNearestUncovered m + , normalize minDistToUncovered m.DistanceToNearestNotVisited m)) + statesInfoToDump + +let collectGameState (basicBlocks:ResizeArray) = let vertices = ResizeArray<_>() let allStates = HashSet<_>() - - - let statesMetrics = ResizeArray<_>() - - let activeStates = - basicBlocks - |> Seq.collect (fun basicBlock -> basicBlock.AssociatedStates) - |> Seq.map (fun s -> s.Id) - |> fun x -> HashSet x - + for currentBasicBlock in basicBlocks do - let interproceduralGraphDistanceFrom = Dictionary>() - let states = currentBasicBlock.AssociatedStates |> Seq.map (fun s -> - if serialize - then statesMetrics.Add (calculateStateMetrics interproceduralGraphDistanceFrom s) State(s.Id, uint <| s.CodeLocation.offset - currentBasicBlock.StartOffset + 1, - 0, s.PathConditionSize, s.VisitedAgainVertices, s.VisitedNotCoveredVerticesInZone, - s.VisitedNotCoveredVerticesOutOfZone, - s.History |> Seq.map (fun kvp -> StateHistoryElem(kvp.Key.Id, kvp.Value)) |> Array.ofSeq, + s.VisitedNotCoveredVerticesOutOfZone, + s.StepWhenMovedLastTime, + s.InstructionsVisitedInCurrentBlock, + s.History |> Seq.map (fun kvp -> kvp.Value) |> Array.ofSeq, s.Children |> Array.map (fun s -> s.Id) ) |> allStates.Add @@ -256,56 +287,17 @@ let collectGameState (basicBlocks:ResizeArray) (serialize: bool) = GameMapVertex( - 0u, currentBasicBlock.Id, currentBasicBlock.IsGoal, uint <| currentBasicBlock.FinalOffset - currentBasicBlock.StartOffset + 1, currentBasicBlock.IsCovered, currentBasicBlock.IsVisited, currentBasicBlock.IsTouched, + currentBasicBlock.ContainsCall, + currentBasicBlock.ContainsThrow, states) |> vertices.Add - let statesInfoToDump = - if serialize - then - let mutable maxVisitedVertices = UInt32.MinValue - let mutable maxChildNumber = UInt32.MinValue - let mutable minDistToUncovered = UInt32.MaxValue - let mutable minDistToNotVisited = UInt32.MaxValue - let mutable minDistToReturn = UInt32.MaxValue - - statesMetrics - |> ResizeArray.iter (fun s -> - if s.VisitedVerticesInZone > maxVisitedVertices - then maxVisitedVertices <- s.VisitedVerticesInZone - if s.ChildNumber > maxChildNumber - then maxChildNumber <- s.ChildNumber - if s.DistanceToNearestUncovered < minDistToUncovered - then minDistToUncovered <- s.DistanceToNearestUncovered - if s.DistanceToNearestNotVisited < minDistToNotVisited - then minDistToNotVisited <- s.DistanceToNearestNotVisited - if s.DistanceToNearestReturn < minDistToReturn - then minDistToReturn <- s.DistanceToNearestReturn - ) - let normalize minV v (sm:StateMetrics) = - if v = minV || (v = UInt32.MaxValue && sm.DistanceToNearestReturn = UInt32.MaxValue) - then 1.0 - elif v = UInt32.MaxValue - then 0.0 - else float (1u + minV) / float (1u + v) - - statesMetrics - |> ResizeArray.map (fun m -> StateInfoToDump (m.StateId - , m.NextInstructionIsUncoveredInZone - , if maxChildNumber = 0u then 0.0 else float m.ChildNumber / float maxChildNumber - , if maxVisitedVertices = 0u then 0.0 else float m.VisitedVerticesInZone / float maxVisitedVertices - , float m.VisitedVerticesInZone / float m.HistoryLength - , normalize minDistToReturn m.DistanceToNearestReturn m - , normalize minDistToUncovered m.DistanceToNearestUncovered m - , normalize minDistToUncovered m.DistanceToNearestNotVisited m)) - |> Some - else None let edges = ResizeArray<_>() for basicBlock in basicBlocks do @@ -316,33 +308,30 @@ let collectGameState (basicBlocks:ResizeArray) (serialize: bool) = GameEdgeLabel (int outgoingEdges.Key)) |> edges.Add - GameState (vertices.ToArray(), allStates |> Array.ofSeq, edges.ToArray()) - , statesInfoToDump - -let collectFullGameState serialize = - let basicBlocks = ResizeArray<_>() - for method in Application.loadedMethods do - for basicBlock in method.Key.BasicBlocks do - basicBlock.IsGoal <- method.Key.InCoverageZone - basicBlocks.Add(basicBlock) - collectGameState basicBlocks serialize + GameState (vertices.ToArray(), allStates |> Array.ofSeq, edges.ToArray()) -let collectGameStateDelta serialize = +let collectGameStateDelta () = let basicBlocks = HashSet<_>(Application.applicationGraphDelta.TouchedBasicBlocks) for method in Application.applicationGraphDelta.LoadedMethods do for basicBlock in method.BasicBlocks do basicBlock.IsGoal <- method.InCoverageZone let added = basicBlocks.Add(basicBlock) () - collectGameState (ResizeArray basicBlocks) serialize - + collectGameState (ResizeArray basicBlocks) -let dumpGameState fileForResultWithoutExtension serialize = - let gameState, statesInfoToDump = collectFullGameState serialize +let dumpGameState fileForResultWithoutExtension = + let basicBlocks = ResizeArray<_>() + for method in Application.loadedMethods do + for basicBlock in method.Key.BasicBlocks do + basicBlock.IsGoal <- method.Key.InCoverageZone + basicBlocks.Add(basicBlock) + + let gameState = collectGameState basicBlocks + let statesInfoToDump = collectStatesInfoToDump basicBlocks let gameStateJson = JsonSerializer.Serialize gameState - let statesInfoJson = JsonSerializer.Serialize statesInfoToDump.Value - System.IO.File.WriteAllText(fileForResultWithoutExtension + "_gameState",gameStateJson) - System.IO.File.WriteAllText(fileForResultWithoutExtension + "_statesInfo",statesInfoJson) + let statesInfoJson = JsonSerializer.Serialize statesInfoToDump + File.WriteAllText(fileForResultWithoutExtension + "_gameState", gameStateJson) + File.WriteAllText(fileForResultWithoutExtension + "_statesInfo", statesInfoJson) let computeReward (statisticsBeforeStep:Statistics) (statisticsAfterStep:Statistics) = let rewardForCoverage = @@ -352,9 +341,4 @@ let computeReward (statisticsBeforeStep:Statistics) (statisticsAfterStep:Statist let maxPossibleReward = (statisticsBeforeStep.TotalVisibleVerticesInZone - statisticsBeforeStep.CoveredVerticesInZone) * 1u Reward (rewardForCoverage, rewardForVisitedInstructions, maxPossibleReward) - -let saveExpectedResult fileForExpectedResults (movedStateId:uint) (statistics1:Statistics) (statistics2:Statistics) = - let reward = computeReward statistics1 statistics2 - - System.IO.File.AppendAllLines(fileForExpectedResults, [sprintf $"%d{firstFreeEpisodeNumber} %d{movedStateId} %d{reward.ForMove.ForCoverage} %d{reward.ForMove.ForVisitedInstructions} %d{reward.MaxPossibleReward}"]) - firstFreeEpisodeNumber <- firstFreeEpisodeNumber + 1 \ No newline at end of file + \ No newline at end of file diff --git a/VSharp.ML.GameServer.Runner/Main.fs b/VSharp.ML.GameServer.Runner/Main.fs index 85ad1baaa..d83792352 100644 --- a/VSharp.ML.GameServer.Runner/Main.fs +++ b/VSharp.ML.GameServer.Runner/Main.fs @@ -1,3 +1,4 @@ +open System.Collections.Generic open System.IO open System.Reflection open Argu @@ -12,23 +13,37 @@ open Suave.WebSocket open VSharp open VSharp.Core open VSharp.Explorer -open VSharp.Interpreter.IL open VSharp.ML.GameServer.Messages open VSharp.ML.GameServer.Maps open VSharp.Runner +type Mode = + | Server = 0 + | Generator = 1 type CliArguments = | [] Port of int - | [] CheckActualCoverage + | [] DatasetBasePath of string + | [] DatasetDescription of string + | [] Mode of Mode + | [] OutFolder of string + | [] StepsToSerialize of uint interface IArgParserTemplate with member s.Usage = match s with | Port _ -> "Port to communicate with game client." - | CheckActualCoverage -> "Check actual coverage using external coverage tool." + | DatasetBasePath _ -> "Full path to dataset root directory. Dll location is /" + | DatasetDescription _ -> "Full paths to JSON-file with dataset description." + | Mode _ -> "Mode to run application. Server --- to train network, Generator --- to generate data for training." + | OutFolder _ -> "Folder to store generated data." + | StepsToSerialize _ -> "Maximal number of steps for each method to serialize." let mutable inTrainMode = true -let ws checkActualCoverage outputDirectory (webSocket : WebSocket) (context: HttpContext) = +let loadGameMaps (datasetDescriptionFilePath:string) = + let jsonString = File.ReadAllText datasetDescriptionFilePath + System.Text.Json.JsonSerializer.Deserialize> jsonString + +let ws outputDirectory (webSocket : WebSocket) (context: HttpContext) = let mutable loop = true socket { @@ -60,7 +75,7 @@ let ws checkActualCoverage outputDirectory (webSocket : WebSocket) (context: Htt let mutable cnt = 0u fun (gameState:GameState) -> let toDot drawHistory = - let file = System.IO.Path.Join ("dot",$"{cnt}.dot") + let file = Path.Join ("dot",$"{cnt}.dot") let vertices = ResizeArray<_>() let edges = ResizeArray<_>() for v in gameState.GraphVertices do @@ -92,7 +107,7 @@ let ws checkActualCoverage outputDirectory (webSocket : WebSocket) (context: Htt yield! edges "}" } - System.IO.File.WriteAllLines(file,dot) + File.WriteAllLines(file,dot) cnt <- cnt + 1u //toDot false let res = @@ -135,34 +150,24 @@ let ws checkActualCoverage outputDirectory (webSocket : WebSocket) (context: Htt else validationMaps.[gameStartParams.MapId] let assembly = RunnerProgram.TryLoadAssembly <| FileInfo settings.AssemblyFullName - let actualCoverage,testsCount,errorsCount = - match settings.CoverageZone with - | CoverageZone.Method -> - let method = RunnerProgram.ResolveMethod(assembly, settings.NameOfObjectToCover) - let options = VSharpOptions(timeout = 15 * 60, outputDirectory = outputDirectory, oracle = oracle, searchStrategy = SearchStrategy.AI, coverageToSwitchToAI = uint settings.CoverageToStart, stepsToPlay = gameStartParams.StepsToPlay, solverTimeout=2) - let statistics = TestGenerator.Cover(method, options) - let actualCOverage = - if checkActualCoverage - then - try - let testsDir = statistics.OutputDir - let _expectedCoverage = 100 - let exploredMethodInfo = AssemblyManager.NormalizeMethod method - let status,actualCoverage,message = VSharp.Test.TestResultChecker.Check(testsDir, exploredMethodInfo :?> MethodInfo, _expectedCoverage) - printfn $"Actual coverage for {settings.MapName}: {actualCoverage}" - System.Nullable (if actualCoverage < 0 then 0u else uint actualCoverage) - with - e -> - printfn $"Coverage checking problem:{e.Message} \n {e.StackTrace}" - System.Nullable(0u) - else System.Nullable() - actualCOverage, statistics.TestsCount * 1u, statistics.ErrorsCount *1u - - | CoverageZone.Class -> - let _type = RunnerProgram.ResolveType(assembly, settings.NameOfObjectToCover) - //TestGenerator.Cover(_type, oracle = oracle, searchStrategy = SearchStrategy.AI, coverageToSwitchToAI = uint settings.CoverageToStart, stepsToPlay = gameStartParams.StepsToPlay, solverTimeout=2) |> ignore - System.Nullable(), 0u, 0u - | x -> failwithf $"Unexpected coverage zone: %A{x}" + let actualCoverage,testsCount,errorsCount = + let method = RunnerProgram.ResolveMethod(assembly, settings.NameOfObjectToCover) + let options = VSharpOptions(timeout = 15 * 60, outputDirectory = outputDirectory, oracle = oracle, searchStrategy = SearchStrategy.AI, coverageToSwitchToAI = uint settings.CoverageToStart, stepsToPlay = gameStartParams.StepsToPlay, solverTimeout=2) + let statistics = TestGenerator.Cover(method, options) + let actualCoverage = + try + let testsDir = statistics.OutputDir + let _expectedCoverage = 100 + let exploredMethodInfo = AssemblyManager.NormalizeMethod method + let status,actualCoverage,message = VSharp.Test.TestResultChecker.Check(testsDir, exploredMethodInfo :?> MethodInfo, _expectedCoverage) + printfn $"Actual coverage for {settings.MapName}: {actualCoverage}" + System.Nullable (if actualCoverage < 0 then 0u else uint actualCoverage) + with + e -> + printfn $"Coverage checking problem:{e.Message} \n {e.StackTrace}" + System.Nullable(0u) + + actualCoverage, statistics.TestsCount * 1u, statistics.ErrorsCount *1u Application.reset() API.Reset() @@ -177,33 +182,71 @@ let ws checkActualCoverage outputDirectory (webSocket : WebSocket) (context: Htt | _ -> () } -let app checkActualCoverage port : WebPart = +let app port : WebPart = choose [ - path "/gameServer" >=> handShake (ws checkActualCoverage port) + path "/gameServer" >=> handShake (ws port) ] - + +let generateDataForPretraining outputDirectory datasetBasePath (maps:Dictionary) stepsToSerialize = + for kvp in maps do + if kvp.Value.CoverageToStart = 0u + then + printfn $"Generation for {kvp.Value.MapName} started." + let assembly = RunnerProgram.TryLoadAssembly <| FileInfo(Path.Combine (datasetBasePath, kvp.Value.AssemblyFullName)) + let method = RunnerProgram.ResolveMethod(assembly, kvp.Value.NameOfObjectToCover) + let options = VSharpOptions(timeout = 5 * 60, outputDirectory = outputDirectory, searchStrategy = SearchStrategy.ExecutionTreeContributedCoverage, stepsLimit = stepsToSerialize, solverTimeout=2, mapName = kvp.Value.MapName, serialize = true) + let statistics = TestGenerator.Cover(method, options) + printfn $"Generation for {kvp.Value.MapName} finished." + Application.reset() + API.Reset() + HashMap.hashMap.Clear() + [] let main args = let parser = ArgumentParser.Create(programName = "VSharp.ML.GameServer.Runner.exe") let args = parser.Parse args - let checkActualCoverage = - match args.TryGetResult <@CheckActualCoverage@> with - | Some _ -> true - | None -> false + + let mode = args.GetResult <@Mode@> + let port = match args.TryGetResult <@Port@> with | Some port -> port | None -> 8100 + let datasetBasePath = + match args.TryGetResult <@DatasetBasePath@> with + | Some path -> path + | None -> "" + + let datasetDescription = + match args.TryGetResult <@DatasetDescription@> with + | Some path -> path + | None -> "" + + let stepsToSerialize = + match args.TryGetResult <@StepsToSerialize@> with + | Some steps -> steps + | None -> 500u + let outputDirectory = Path.Combine(Directory.GetCurrentDirectory(), string port) + if Directory.Exists outputDirectory then Directory.Delete(outputDirectory,true) let testsDirInfo = Directory.CreateDirectory outputDirectory printfn $"outputDir: {outputDirectory}" - - startWebServer {defaultConfig with - logger = Targets.create Verbose [||] - bindings = [HttpBinding.createSimple HTTP "127.0.0.1" port]} (app checkActualCoverage outputDirectory) + //let s = System.Text.Json.JsonSerializer.Serialize(trainMaps) + //printfn $"{s}" + + let maps = loadGameMaps datasetDescription + + match mode with + | Mode.Server -> + startWebServer {defaultConfig with + logger = Targets.create Verbose [||] + bindings = [HttpBinding.createSimple HTTP "127.0.0.1" port]} (app outputDirectory) + | Mode.Generator -> + generateDataForPretraining outputDirectory datasetBasePath maps stepsToSerialize + 0 \ No newline at end of file diff --git a/VSharp.ML.GameServer/Maps.fs b/VSharp.ML.GameServer/Maps.fs index 6e08d33aa..272385740 100644 --- a/VSharp.ML.GameServer/Maps.fs +++ b/VSharp.ML.GameServer/Maps.fs @@ -9,428 +9,427 @@ let trainMaps, validationMaps = let add' (maps:Dictionary<_,_>) = let mutable firstFreeMapId = 0u - fun maxSteps coverageToStart pathToDll coverageZone objectToCover -> - maps.Add(firstFreeMapId, GameMap(firstFreeMapId, maxSteps, coverageToStart, pathToDll, coverageZone, objectToCover)) + fun maxSteps coverageToStart pathToDll objectToCover -> + maps.Add(firstFreeMapId, GameMap(firstFreeMapId, maxSteps, coverageToStart, pathToDll, objectToCover)) firstFreeMapId <- firstFreeMapId + 1u let add = add' trainMaps 10000000u - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinarySearch" - add 50u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinarySearch" + add 0u "VSharp.ML.GameMaps.dll" "BinarySearch" + add 50u "VSharp.ML.GameMaps.dll" "BinarySearch" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches1" + add 0u "VSharp.ML.GameMaps.dll" "Switches1" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches2" - //debug me//add 15u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches2" + add 0u "VSharp.ML.GameMaps.dll" "Switches2" + //debug me//add 15u "VSharp.ML.GameMaps.dll" "Switches2" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches3" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches4" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "Switches5" + add 0u "VSharp.ML.GameMaps.dll" "Switches3" + add 0u "VSharp.ML.GameMaps.dll" "Switches4" + add 0u "VSharp.ML.GameMaps.dll" "Switches5" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "NestedFors" + add 0u "VSharp.ML.GameMaps.dll" "NestedFors" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "SearchKMP" - add 20u "VSharp.ML.GameMaps.dll" CoverageZone.Method "SearchKMP" + add 0u "VSharp.ML.GameMaps.dll" "SearchKMP" + add 20u "VSharp.ML.GameMaps.dll" "SearchKMP" - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "SearchWords" - //add 10u "VSharp.ML.GameMaps.dll" CoverageZone.Method "SearchWords" + //add 0u "VSharp.ML.GameMaps.dll" "SearchWords" + //add 10u "VSharp.ML.GameMaps.dll" "SearchWords" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BellmanFord" - add 60u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BellmanFord" + add 0u "VSharp.ML.GameMaps.dll" "BellmanFord" + add 60u "VSharp.ML.GameMaps.dll" "BellmanFord" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "bsPartition" - add 20u "VSharp.ML.GameMaps.dll" CoverageZone.Method "bsPartition" - add 70u "VSharp.ML.GameMaps.dll" CoverageZone.Method "bsPartition" + add 0u "VSharp.ML.GameMaps.dll" "bsPartition" + add 20u "VSharp.ML.GameMaps.dll" "bsPartition" + add 70u "VSharp.ML.GameMaps.dll" "bsPartition" - - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "determinant" - add 50u "VSharp.ML.GameMaps.dll" CoverageZone.Method "determinant" + add 0u "VSharp.ML.GameMaps.dll" "determinant" + add 50u "VSharp.ML.GameMaps.dll" "determinant" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "getCofactor" - add 50u "VSharp.ML.GameMaps.dll" CoverageZone.Method "getCofactor" + add 0u "VSharp.ML.GameMaps.dll" "getCofactor" + add 50u "VSharp.ML.GameMaps.dll" "getCofactor" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "fillRemaining" - add 20u "VSharp.ML.GameMaps.dll" CoverageZone.Method "fillRemaining" - add 40u "VSharp.ML.GameMaps.dll" CoverageZone.Method "fillRemaining" + add 0u "VSharp.ML.GameMaps.dll" "fillRemaining" + add 20u "VSharp.ML.GameMaps.dll" "fillRemaining" + add 40u "VSharp.ML.GameMaps.dll" "fillRemaining" - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "solveWordWrap" - //add 20u "VSharp.ML.GameMaps.dll" CoverageZone.Method "solveWordWrap" - //add 80u "VSharp.ML.GameMaps.dll" CoverageZone.Method "solveWordWrap" + //add 0u "VSharp.ML.GameMaps.dll" "solveWordWrap" + //add 20u "VSharp.ML.GameMaps.dll" "solveWordWrap" + //add 80u "VSharp.ML.GameMaps.dll" "solveWordWrap" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "waysToIncreaseLCSBy1" - //add 30u "VSharp.ML.GameMaps.dll" CoverageZone.Method "waysToIncreaseLCSBy1" - //add 70u "VSharp.ML.GameMaps.dll" CoverageZone.Method "waysToIncreaseLCSBy1" + add 0u "VSharp.ML.GameMaps.dll" "waysToIncreaseLCSBy1" + //add 30u "VSharp.ML.GameMaps.dll" "waysToIncreaseLCSBy1" + //add 70u "VSharp.ML.GameMaps.dll" "waysToIncreaseLCSBy1" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinaryMaze1BFS" - add 30u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinaryMaze1BFS" - add 70u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinaryMaze1BFS" + add 0u "VSharp.ML.GameMaps.dll" "BinaryMaze1BFS" + add 30u "VSharp.ML.GameMaps.dll" "BinaryMaze1BFS" + add 70u "VSharp.ML.GameMaps.dll" "BinaryMaze1BFS" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "findShortestPathLength" - add 30u "VSharp.ML.GameMaps.dll" CoverageZone.Method "findShortestPathLength" - add 80u "VSharp.ML.GameMaps.dll" CoverageZone.Method "findShortestPathLength" + add 0u "VSharp.ML.GameMaps.dll" "findShortestPathLength" + add 30u "VSharp.ML.GameMaps.dll" "findShortestPathLength" + add 80u "VSharp.ML.GameMaps.dll" "findShortestPathLength" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "countIslands" - add 30u "VSharp.ML.GameMaps.dll" CoverageZone.Method "countIslands" + add 0u "VSharp.ML.GameMaps.dll" "countIslands" + add 30u "VSharp.ML.GameMaps.dll" "countIslands" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "MatrixQueryModifyMatrix" - add 50u "VSharp.ML.GameMaps.dll" CoverageZone.Method "MatrixQueryModifyMatrix" + add 0u "VSharp.ML.GameMaps.dll" "MatrixQueryModifyMatrix" + add 50u "VSharp.ML.GameMaps.dll" "MatrixQueryModifyMatrix" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "RedBlackTreeInsert" + add 0u "VSharp.ML.GameMaps.dll" "RedBlackTreeInsert" - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "AhoCorasickMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "KMPSearchMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinSearchMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "MatrixMultiplicationMain" - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "MergeSortMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "SudokuMain" - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "WordWrapMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "LCSMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinaryMaze1Main" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "BinaryMaze2Main" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "IslandsMain" - add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "MatrixQueryMain" + //add 0u "VSharp.ML.GameMaps.dll" "AhoCorasickMain" + add 0u "VSharp.ML.GameMaps.dll" "KMPSearchMain" + add 0u "VSharp.ML.GameMaps.dll" "BinSearchMain" + add 0u "VSharp.ML.GameMaps.dll" "MatrixMultiplicationMain" + //add 0u "VSharp.ML.GameMaps.dll" "MergeSortMain" + add 0u "VSharp.ML.GameMaps.dll" "SudokuMain" + //add 0u "VSharp.ML.GameMaps.dll" "WordWrapMain" + add 0u "VSharp.ML.GameMaps.dll" "LCSMain" + add 0u "VSharp.ML.GameMaps.dll" "BinaryMaze1Main" + add 0u "VSharp.ML.GameMaps.dll" "BinaryMaze2Main" + add 0u "VSharp.ML.GameMaps.dll" "IslandsMain" + add 0u "VSharp.ML.GameMaps.dll" "MatrixQueryMain" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindArticulationPoints" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindBridges" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "Compress" + add 0u "Advanced.Algorithms.dll" "FindArticulationPoints" + add 0u "Advanced.Algorithms.dll" "FindBridges" + add 0u "Advanced.Algorithms.dll" "Compress" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindGCD" - add 50u "Advanced.Algorithms.dll" CoverageZone.Method "FindGCD" + add 0u "Advanced.Algorithms.dll" "FindGCD" + add 50u "Advanced.Algorithms.dll" "FindGCD" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindIntersections" + add 0u "Advanced.Algorithms.dll" "FindIntersections" //!!!DEBUG ME!!!// - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindSmallest" + //add 0u "Advanced.Algorithms.dll" "FindSmallest" //!!!DEBUG ME!!!// - //add 10u "Advanced.Algorithms.dll" CoverageZone.Method "FindSmallest" + //add 10u "Advanced.Algorithms.dll" "FindSmallest" - (*add 0u "Advanced.Algorithms.dll" CoverageZone.Method "insertionSort"*) + (*add 0u "Advanced.Algorithms.dll" "insertionSort"*) - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BaseConvert" + add 0u "Advanced.Algorithms.dll" "BaseConvert" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindAllPairShortestPathsJohnsons" + add 0u "Advanced.Algorithms.dll" "FindAllPairShortestPathsJohnsons" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindMinWeightMain" + //add 0u "Advanced.Algorithms.dll" "FindMinWeightMain" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindCombinationRecurse" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindPermutationRecurse" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindSubsetRecurse" + add 0u "Advanced.Algorithms.dll" "FindCombinationRecurse" + add 0u "Advanced.Algorithms.dll" "FindPermutationRecurse" + add 0u "Advanced.Algorithms.dll" "FindSubsetRecurse" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "CalcBase10LogFloor" + add 0u "Advanced.Algorithms.dll" "CalcBase10LogFloor" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressDictionary.ContainsKey" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressDictionary.Add" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressDictionary.Remove" + //add 0u "Advanced.Algorithms.dll" "OpenAddressDictionary.ContainsKey" + //add 0u "Advanced.Algorithms.dll" "OpenAddressDictionary.Add" + //add 0u "Advanced.Algorithms.dll" "OpenAddressDictionary.Remove" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SeparateChainingDictionary.ContainsKey" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SeparateChainingDictionary.Add" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SeparateChainingDictionary.Remove" + //add 0u "Advanced.Algorithms.dll" "SeparateChainingDictionary.ContainsKey" + //add 0u "Advanced.Algorithms.dll" "SeparateChainingDictionary.Add" + //add 0u "Advanced.Algorithms.dll" "SeparateChainingDictionary.Remove" - //add 0u "Advanced.Algorithms.dll" CoverageZone.Method "QuadTree.Delete" + //add 0u "Advanced.Algorithms.dll" "QuadTree.Delete" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SuffixTree.Insert" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SuffixTree.Delete" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SuffixTree.Contains" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "SuffixTree.StartsWith" + add 0u "Advanced.Algorithms.dll" "SuffixTree.Insert" + add 0u "Advanced.Algorithms.dll" "SuffixTree.Delete" + add 0u "Advanced.Algorithms.dll" "SuffixTree.Contains" + add 0u "Advanced.Algorithms.dll" "SuffixTree.StartsWith" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BpTree.HasItem" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BpTree.Insert" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BpTree.Delete" + add 0u "Advanced.Algorithms.dll" "BpTree.HasItem" + add 0u "Advanced.Algorithms.dll" "BpTree.Insert" + add 0u "Advanced.Algorithms.dll" "BpTree.Delete" (* - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressHashSet.Contains" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressHashSet.Add" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "OpenAddressHashSet.Remove" + add 0u "Advanced.Algorithms.dll" "OpenAddressHashSet.Contains" + add 0u "Advanced.Algorithms.dll" "OpenAddressHashSet.Add" + add 0u "Advanced.Algorithms.dll" "OpenAddressHashSet.Remove" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BloomFilter.AddKey" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "BloomFilter.KeyExists" + add 0u "Advanced.Algorithms.dll" "BloomFilter.AddKey" + add 0u "Advanced.Algorithms.dll" "BloomFilter.KeyExists" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "DisJointSet.Union" - add 0u "Advanced.Algorithms.dll" CoverageZone.Method "DisJointSet.FindSet" + add 0u "Advanced.Algorithms.dll" "DisJointSet.Union" + add 0u "Advanced.Algorithms.dll" "DisJointSet.FindSet" *) - //+add 0u "Cosmos.Core.dll" CoverageZone.Method "CPU.EstimateCPUSpeedFromName" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "CPU.GetMemoryMap" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "CPU.GetLargestMemoryBlock" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "CPU.GetCPUBrandString" - - //add 0u "Cosmos.Core.dll" CoverageZone.Method "GCImplementation.AllocNewObject" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "GCImplementation.Free" - //+add 0u "Cosmos.Core.dll" CoverageZone.Method "GCImplementation.GetAvailableRAM" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "GCImplementation.Init" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "GCImplementation.IncRootCountsInStruct" - - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.Realloc" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.Alloc" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.Free" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.Collect" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.MarkAndSweepObject" - //add 0u "Cosmos.Core.dll" CoverageZone.Method "Heap.SweepTypedObject" + //+add 0u "Cosmos.Core.dll" "CPU.EstimateCPUSpeedFromName" + //add 0u "Cosmos.Core.dll" "CPU.GetMemoryMap" + //add 0u "Cosmos.Core.dll" "CPU.GetLargestMemoryBlock" + //add 0u "Cosmos.Core.dll" "CPU.GetCPUBrandString" + + //add 0u "Cosmos.Core.dll" "GCImplementation.AllocNewObject" + //add 0u "Cosmos.Core.dll" "GCImplementation.Free" + //+add 0u "Cosmos.Core.dll" "GCImplementation.GetAvailableRAM" + //add 0u "Cosmos.Core.dll" "GCImplementation.Init" + //add 0u "Cosmos.Core.dll" "GCImplementation.IncRootCountsInStruct" + + //add 0u "Cosmos.Core.dll" "Heap.Realloc" + //add 0u "Cosmos.Core.dll" "Heap.Alloc" + //add 0u "Cosmos.Core.dll" "Heap.Free" + //add 0u "Cosmos.Core.dll" "Heap.Collect" + //add 0u "Cosmos.Core.dll" "Heap.MarkAndSweepObject" + //add 0u "Cosmos.Core.dll" "Heap.SweepTypedObject" (* - add 0u "Cosmos.Core.dll" CoverageZone.Method "Multiboot2.Init" + add 0u "Cosmos.Core.dll" "Multiboot2.Init" - add 0u "Cosmos.Core.dll" CoverageZone.Method "VTablesImpl.IsInstance" - add 0u "Cosmos.Core.dll" CoverageZone.Method "VTablesImpl.SetTypeInfo" - add 0u "Cosmos.Core.dll" CoverageZone.Method "VTablesImpl.GetMethodAddressForType" + add 0u "Cosmos.Core.dll" "VTablesImpl.IsInstance" + add 0u "Cosmos.Core.dll" "VTablesImpl.SetTypeInfo" + add 0u "Cosmos.Core.dll" "VTablesImpl.GetMethodAddressForType" *) - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.LastIndexOf" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.Add" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.ToArray" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.RemoveAt" + add 0u "JetBrains.Lifetimes.dll" "CompactList.LastIndexOf" + add 0u "JetBrains.Lifetimes.dll" "CompactList.Add" + add 0u "JetBrains.Lifetimes.dll" "CompactList.ToArray" + add 0u "JetBrains.Lifetimes.dll" "CompactList.RemoveAt" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.Add" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.Clear" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.Remove" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.RemoveAt" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.Insert" + add 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.Add" + add 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.Clear" + add 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.Remove" + add 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.RemoveAt" + add 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.Insert" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "JetPriorityQueue.Add" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "JetPriorityQueue.Clear" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "JetPriorityQueue.TryExtract" - add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "JetPriorityQueue.TryPeek" + add 0u "JetBrains.Lifetimes.dll" "JetPriorityQueue.Add" + add 0u "JetBrains.Lifetimes.dll" "JetPriorityQueue.Clear" + add 0u "JetBrains.Lifetimes.dll" "JetPriorityQueue.TryExtract" + add 0u "JetBrains.Lifetimes.dll" "JetPriorityQueue.TryPeek" - //--add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.FlowInto" - //--add 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.AdviseAddRemove" + //--add 0u "JetBrains.Lifetimes.dll" "ReactiveEx.FlowInto" + //--add 0u "JetBrains.Lifetimes.dll" "ReactiveEx.AdviseAddRemove" - //add 0u "Algorithms.dll" CoverageZone.Method "BinaryTreeRecursiveWalker.ForEach" - //add 0u "Algorithms.dll" CoverageZone.Method "BinaryTreeRecursiveWalker.BinarySearch" - - //add 0u "Algorithms.dll" CoverageZone.Method "CyclesDetector.IsCyclic" - - add 0u "Algorithms.dll" CoverageZone.Method "Permutations.IsAnargram" - add 0u "Algorithms.dll" CoverageZone.Method "HeapSorter.HeapSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "OddEvenSorter.OddEvenSortAscending" - - //add 0u "Algorithms.dll" CoverageZone.Method "BinarySearchTreeSorter.UnbalancedBSTSort" - add 0u "Algorithms.dll" CoverageZone.Method "BubbleSorter.BubbleSortAscending" - //add 0u "Algorithms.dll" CoverageZone.Method "BucketSorter.BucketSortAscending" - //add 0u "Algorithms.dll" CoverageZone.Method "CombSorter.CombSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "CountingSorter.CountingSort" - add 0u "Algorithms.dll" CoverageZone.Method "CycleSorter.CycleSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "GnomeSorter.GnomeSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "InsertionSorter.InsertionSort" - //add 0u "Algorithms.dll" CoverageZone.Method "PigeonHoleSorter.PigeonHoleSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "SelectionSorter.SelectionSortAscending" - add 0u "Algorithms.dll" CoverageZone.Method "ShellSorter.ShellSortAscending" - - add 0u "Algorithms.dll" CoverageZone.Method "GreatestCommonDivisor.FindGCDEuclidean" - add 0u "Algorithms.dll" CoverageZone.Method "GreatestCommonDivisor.FindGCDStein" - - add 0u "Algorithms.dll" CoverageZone.Method "SieveOfEratosthenes.GeneratePrimesUpTo" + //add 0u "Algorithms.dll" "BinaryTreeRecursiveWalker.ForEach" + //add 0u "Algorithms.dll" "BinaryTreeRecursiveWalker.BinarySearch" + + //add 0u "Algorithms.dll" "CyclesDetector.IsCyclic" + + add 0u "Algorithms.dll" "Permutations.IsAnargram" + add 0u "Algorithms.dll" "HeapSorter.HeapSortAscending" + add 0u "Algorithms.dll" "OddEvenSorter.OddEvenSortAscending" + + //add 0u "Algorithms.dll" "BinarySearchTreeSorter.UnbalancedBSTSort" + add 0u "Algorithms.dll" "BubbleSorter.BubbleSortAscending" + //add 0u "Algorithms.dll" "BucketSorter.BucketSortAscending" + //add 0u "Algorithms.dll" "CombSorter.CombSortAscending" + add 0u "Algorithms.dll" "CountingSorter.CountingSort" + add 0u "Algorithms.dll" "CycleSorter.CycleSortAscending" + add 0u "Algorithms.dll" "GnomeSorter.GnomeSortAscending" + add 0u "Algorithms.dll" "InsertionSorter.InsertionSort" + //add 0u "Algorithms.dll" "PigeonHoleSorter.PigeonHoleSortAscending" + add 0u "Algorithms.dll" "SelectionSorter.SelectionSortAscending" + add 0u "Algorithms.dll" "ShellSorter.ShellSortAscending" + + add 0u "Algorithms.dll" "GreatestCommonDivisor.FindGCDEuclidean" + add 0u "Algorithms.dll" "GreatestCommonDivisor.FindGCDStein" + + add 0u "Algorithms.dll" "SieveOfEratosthenes.GeneratePrimesUpTo" - //add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscHasher.Calculate_PSX_BizIDHash" - //add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscHasher.Calculate_PSX_RedumpHash" + //add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscHasher.Calculate_PSX_BizIDHash" + //add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscHasher.Calculate_PSX_RedumpHash" - add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscMountJob.Run" - add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscHasher.OldHash" + add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscMountJob.Run" + add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscHasher.OldHash" - //add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscSectorReader.ReadLBA_SubQ" - //add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscSectorReader.ReadLBA_2448" - //add 0u "BizHawk.Emulation.DiscSystem.dll" CoverageZone.Method "DiscStream.Read" + //add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscSectorReader.ReadLBA_SubQ" + //add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscSectorReader.ReadLBA_2448" + //add 0u "BizHawk.Emulation.DiscSystem.dll" "DiscStream.Read" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "TI83LinkPort.Update" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradGateArray.ClockCycle" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradGateArray.OnHSYNC" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradGateArray.GetVideoBuffer" - - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CRCT_6845.ClockCycle" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CRTC6845.CycleClock" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CRTC6845.ReadPort" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CRTC6845.WritePort" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "ScanLine.AddDisplayValue" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "ScanLine.CommitScanline" - - add 0u "Virtu.dll" CoverageZone.Method "DiskIIController.ReadIoRegionC0C0" - add 0u "Virtu.dll" CoverageZone.Method "DiskIIController.WriteIoRegionC0C0" + add 0u "BizHawk.Emulation.Cores.dll" "TI83LinkPort.Update" + add 0u "BizHawk.Emulation.Cores.dll" "AmstradGateArray.ClockCycle" + //add 0u "BizHawk.Emulation.Cores.dll" "AmstradGateArray.OnHSYNC" + add 0u "BizHawk.Emulation.Cores.dll" "AmstradGateArray.GetVideoBuffer" + + add 0u "BizHawk.Emulation.Cores.dll" "CRCT_6845.ClockCycle" + add 0u "BizHawk.Emulation.Cores.dll" "CRTC6845.CycleClock" + add 0u "BizHawk.Emulation.Cores.dll" "CRTC6845.ReadPort" + //add 0u "BizHawk.Emulation.Cores.dll" "CRTC6845.WritePort" + add 0u "BizHawk.Emulation.Cores.dll" "ScanLine.AddDisplayValue" + add 0u "BizHawk.Emulation.Cores.dll" "ScanLine.CommitScanline" + + add 0u "Virtu.dll" "DiskIIController.ReadIoRegionC0C0" + add 0u "Virtu.dll" "DiskIIController.WriteIoRegionC0C0" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "MC68000.Disassemble" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CP1610.Disassemble" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CP1610.Execute" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "F3850.FetchInstruction" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "HuC6280.DisassembleExt" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "HuC6280.Execute" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "HuC6280.DisassembleCDL" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "I8048.Disassemble" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "I8048.ExecuteOne" - - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "LR35902.BuildInstructionTable" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "LR35902.Disassemble" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "LR35902.ADDS_Func" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "LR35902.DA_Func" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "MC6800.ExecuteOne" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "MC6800.DA_Func" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "MOS6502X.State" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "x86.Execute" + add 0u "BizHawk.Emulation.Cores.dll" "MC68000.Disassemble" + //add 0u "BizHawk.Emulation.Cores.dll" "CP1610.Disassemble" + //add 0u "BizHawk.Emulation.Cores.dll" "CP1610.Execute" + //add 0u "BizHawk.Emulation.Cores.dll" "F3850.FetchInstruction" + //add 0u "BizHawk.Emulation.Cores.dll" "HuC6280.DisassembleExt" + //add 0u "BizHawk.Emulation.Cores.dll" "HuC6280.Execute" + //add 0u "BizHawk.Emulation.Cores.dll" "HuC6280.DisassembleCDL" + add 0u "BizHawk.Emulation.Cores.dll" "I8048.Disassemble" + add 0u "BizHawk.Emulation.Cores.dll" "I8048.ExecuteOne" + + //add 0u "BizHawk.Emulation.Cores.dll" "LR35902.BuildInstructionTable" + //add 0u "BizHawk.Emulation.Cores.dll" "LR35902.Disassemble" + //add 0u "BizHawk.Emulation.Cores.dll" "LR35902.ADDS_Func" + //add 0u "BizHawk.Emulation.Cores.dll" "LR35902.DA_Func" + add 0u "BizHawk.Emulation.Cores.dll" "MC6800.ExecuteOne" + //add 0u "BizHawk.Emulation.Cores.dll" "MC6800.DA_Func" + add 0u "BizHawk.Emulation.Cores.dll" "MOS6502X.State" + //add 0u "BizHawk.Emulation.Cores.dll" "x86.Execute" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Emu83.LoadStateBinary" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "NECUPD765.ReadPort" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "NECUPD765.SetUnitSelect" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AY38912.PortWrite" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPCBase.PollInput" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPCBase.LoadAllMedia" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPCBase.DecodeINPort" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "GateArrayBase.SetupScreenMapping" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "GateArrayBase.ClockCycle" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPC6128.ReadBus" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPC6128.WriteBus" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPC6128.InitROM" - - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPC6128.ReadPort" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPC6128.WritePort" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.AmstradCPC" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.GetFirmware" + //add 0u "BizHawk.Emulation.Cores.dll" "Emu83.LoadStateBinary" + add 0u "BizHawk.Emulation.Cores.dll" "NECUPD765.ReadPort" + add 0u "BizHawk.Emulation.Cores.dll" "NECUPD765.SetUnitSelect" + //add 0u "BizHawk.Emulation.Cores.dll" "AY38912.PortWrite" + add 0u "BizHawk.Emulation.Cores.dll" "CPCBase.PollInput" + //add 0u "BizHawk.Emulation.Cores.dll" "CPCBase.LoadAllMedia" + add 0u "BizHawk.Emulation.Cores.dll" "CPCBase.DecodeINPort" + add 0u "BizHawk.Emulation.Cores.dll" "GateArrayBase.SetupScreenMapping" + add 0u "BizHawk.Emulation.Cores.dll" "GateArrayBase.ClockCycle" + //add 0u "BizHawk.Emulation.Cores.dll" "CPC6128.ReadBus" + //add 0u "BizHawk.Emulation.Cores.dll" "CPC6128.WriteBus" + add 0u "BizHawk.Emulation.Cores.dll" "CPC6128.InitROM" + + //add 0u "BizHawk.Emulation.Cores.dll" "CPC6128.ReadPort" + add 0u "BizHawk.Emulation.Cores.dll" "CPC6128.WritePort" + //add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.AmstradCPC" + add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.GetFirmware" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.FrameAdvance" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CPCMachineMetaData.GetMetaString" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.OSD_ShowDiskStatus" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.OSD_ShowTapeStatus" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "AmstradCPC.CheckMessageSettings" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "SoundProviderMixer.GetSamplesSync" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "CartridgeDevice.Load" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Mapper0000.Mapper0000" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Mapper000F.Mapper000F" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Mapper0005.Mapper0005" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Mapper0013.Mapper0013" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Mapper0020.Mapper0020" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "D64.Read" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "DiskBuilder.Build" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "G64.Read" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "G64.Write" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Prg.Load" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Tape.ExecuteCycle" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Tape.Load" + // add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.FrameAdvance" + // add 0u "BizHawk.Emulation.Cores.dll" "CPCMachineMetaData.GetMetaString" + add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.OSD_ShowDiskStatus" + // add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.OSD_ShowTapeStatus" + // add 0u "BizHawk.Emulation.Cores.dll" "AmstradCPC.CheckMessageSettings" + // add 0u "BizHawk.Emulation.Cores.dll" "SoundProviderMixer.GetSamplesSync" + //add 0u "BizHawk.Emulation.Cores.dll" "CartridgeDevice.Load" + // add 0u "BizHawk.Emulation.Cores.dll" "Mapper0000.Mapper0000" + // add 0u "BizHawk.Emulation.Cores.dll" "Mapper000F.Mapper000F" + // add 0u "BizHawk.Emulation.Cores.dll" "Mapper0005.Mapper0005" + // add 0u "BizHawk.Emulation.Cores.dll" "Mapper0013.Mapper0013" + // add 0u "BizHawk.Emulation.Cores.dll" "Mapper0020.Mapper0020" + //add 0u "BizHawk.Emulation.Cores.dll" "D64.Read" + //add 0u "BizHawk.Emulation.Cores.dll" "DiskBuilder.Build" + //add 0u "BizHawk.Emulation.Cores.dll" "G64.Read" + add 0u "BizHawk.Emulation.Cores.dll" "G64.Write" + add 0u "BizHawk.Emulation.Cores.dll" "Prg.Load" + add 0u "BizHawk.Emulation.Cores.dll" "Tape.ExecuteCycle" + //add 0u "BizHawk.Emulation.Cores.dll" "Tape.Load" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Chip6510.Read" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Chip6510.Write" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Chip6526.CreateCia1" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Chip90611401.Write" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Cia.ExecutePhase" - // add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Cia.Write" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Sid.Flush" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Sid.filter_operator" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Envelope.ExecutePhase2" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Sid.Write" + // add 0u "BizHawk.Emulation.Cores.dll" "Chip6510.Read" + // add 0u "BizHawk.Emulation.Cores.dll" "Chip6510.Write" + // add 0u "BizHawk.Emulation.Cores.dll" "Chip6526.CreateCia1" + add 0u "BizHawk.Emulation.Cores.dll" "Chip90611401.Write" + //add 0u "BizHawk.Emulation.Cores.dll" "Cia.ExecutePhase" + // add 0u "BizHawk.Emulation.Cores.dll" "Cia.Write" + add 0u "BizHawk.Emulation.Cores.dll" "Sid.Flush" + //add 0u "BizHawk.Emulation.Cores.dll" "Sid.filter_operator" + add 0u "BizHawk.Emulation.Cores.dll" "Envelope.ExecutePhase2" + add 0u "BizHawk.Emulation.Cores.dll" "Sid.Write" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Sid.GetSamplesSync" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Via.ExecutePhase" - //add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Via.SyncState" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Via.Write" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Vic.ExecutePhase1" - add 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "Vic.Read" - - //add 0u "Virtu.dll" CoverageZone.Method "Keyboard.SetKeys" - - //add 0u "Algorithms.dll" CoverageZone.Method "TopologicalSorter.Sort" - //add 0u "Algorithms.dll" CoverageZone.Method "DijkstraShortestPaths.ShortestPathTo" - //add 0u "Algorithms.dll" CoverageZone.Method "DijkstraAllPairsShortestPaths.ShortestPath" - //add 0u "Algorithms.dll" CoverageZone.Method "DepthFirstSearcher.FindFirstMatch" - //add 0u "Algorithms.dll" CoverageZone.Method "ConnectedComponents.Compute" - //add 0u "Algorithms.dll" CoverageZone.Method "BreadthFirstShortestPaths.ShortestPathTo" - //add 0u "Algorithms.dll" CoverageZone.Method "BreadthFirstSearcher.FindFirstMatch" - //add 0u "Algorithms.dll" CoverageZone.Method "BellmanFordShortestPaths.ShortestPathTo" - - - //add 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "KruskalMST" - //add 20u "VSharp.ML.GameMaps.dll" CoverageZone.Method "KruskalMST" - //add 40u "VSharp.ML.GameMaps.dll" CoverageZone.Method "KruskalMST" - //add 60u "VSharp.ML.GameMaps.dll" CoverageZone.Method "KruskalMST" + //add 0u "BizHawk.Emulation.Cores.dll" "Sid.GetSamplesSync" + //add 0u "BizHawk.Emulation.Cores.dll" "Via.ExecutePhase" + //add 0u "BizHawk.Emulation.Cores.dll" "Via.SyncState" + add 0u "BizHawk.Emulation.Cores.dll" "Via.Write" + add 0u "BizHawk.Emulation.Cores.dll" "Vic.ExecutePhase1" + add 0u "BizHawk.Emulation.Cores.dll" "Vic.Read" + + //add 0u "Virtu.dll" "Keyboard.SetKeys" + + //add 0u "Algorithms.dll" "TopologicalSorter.Sort" + //add 0u "Algorithms.dll" "DijkstraShortestPaths.ShortestPathTo" + //add 0u "Algorithms.dll" "DijkstraAllPairsShortestPaths.ShortestPath" + //add 0u "Algorithms.dll" "DepthFirstSearcher.FindFirstMatch" + //add 0u "Algorithms.dll" "ConnectedComponents.Compute" + //add 0u "Algorithms.dll" "BreadthFirstShortestPaths.ShortestPathTo" + //add 0u "Algorithms.dll" "BreadthFirstSearcher.FindFirstMatch" + //add 0u "Algorithms.dll" "BellmanFordShortestPaths.ShortestPathTo" + + + //add 0u "VSharp.ML.GameMaps.dll" "KruskalMST" + //add 20u "VSharp.ML.GameMaps.dll" "KruskalMST" + //add 40u "VSharp.ML.GameMaps.dll" "KruskalMST" + //add 60u "VSharp.ML.GameMaps.dll" "KruskalMST" let add = add' validationMaps - //!!!add 1000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "mergeSort" - //add 20000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "LoanExamBuild" - //add 10000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "multiply_matrix" - //add 10000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "adjoint" - add 5000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "LoanExamBuild" - add 5000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "multiply_matrix" - add 5000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "adjoint" - add 1000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "bridge" - add 1000u 0u "VSharp.ML.GameMaps.dll" CoverageZone.Method "PrimeFactorCount" - //add 10000u 0u "Advanced.Algorithms.dll" CoverageZone.Method "FindLongestPalindrome" - add 5000u 0u "Advanced.Algorithms.dll" CoverageZone.Method "bucketSort" - //add 15000u 0u "Advanced.Algorithms.dll" CoverageZone.Method "GetMaxBiPartiteMatchingMain" - add 5000u 0u "Advanced.Algorithms.dll" CoverageZone.Method "GetMaxBiPartiteMatchingMain" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.AdviseUntil" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.AdviseOnce" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Types.ToString" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.Clear" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CompactList.GetEnumerator" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.Contains" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.CopyTo" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.GetEnumerator" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CopyOnWriteList.IndexOf" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "BitHacks.Log2Floor" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "BitHacks.Log2Ceil" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "BitHacks.NumberOfBitSet" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.AddFirst" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.AddLast" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.ForEachValue" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.PeekFirst" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.PeekLast" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.RemoveLastReferenceEqual" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "StaticsForType.ReplaceFirst" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Statics.For" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Memory.Barrier" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Memory.CopyMemory" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.AdviseUntil" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "ReactiveEx.AdviseOnce" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Types.ToString" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "Types.OptionalTypeInfo" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CollectionEx.ContentHashCode" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CollectionEx.TryDequeue" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "CollectionEx.Enqueued" - - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "SingleThreadScheduler.RunInCurrentStackFrame" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "SingleThreadScheduler.RunOnSeparateThread" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "SingleThreadScheduler.CreateOverExisting" - add 5000u 0u "JetBrains.Lifetimes.dll" CoverageZone.Method "SingleThreadScheduler.Queue" - - add 5000u 0u "BizHawk.Emulation.Cores.dll" CoverageZone.Method "LR35902.ExecuteOne" - - add 5000u 0u "Unity.dll" CoverageZone.Method "ShaderStringBuilder.AppendLines" - add 5000u 0u "Unity.dll" CoverageZone.Method "ShaderStringBuilder.Concat" - add 5000u 0u "Unity.dll" CoverageZone.Method "ShaderStringBuilder.Dispose" - add 5000u 0u "Unity.dll" CoverageZone.Method "SlotValueHelper.AreCompatible" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslTokenizer.GetOperatorToken" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslTokenizer.ParseNumericLiteral" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslTokenizer.Init" - add 5000u 0u "Unity.dll" CoverageZone.Method "PartialDerivUtilWriter.MakeBinaryFunc" - add 5000u 0u "Unity.dll" CoverageZone.Method "PartialDerivUtilWriter.MakeSingleFunc" - add 5000u 0u "Unity.dll" CoverageZone.Method "PartialDerivUtilWriter.MakeImplicitCast" - add 5000u 0u "Unity.dll" CoverageZone.Method "PartialDerivUtilWriter.GenerateDefinitionsAndFuncs" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslParser.ParseStruct" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslParser.ParseStatement" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslGenerator.MarkApdNodesAndVariablesIsLegal" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslGenerator.CalculateApdDependenciesRecurse" - add 5000u 0u "Unity.dll" CoverageZone.Method "HlslGenerator.GenerateNodeExpression" - add 5000u 0u "Unity.dll" CoverageZone.Method "Collections.Bitwise.FindUlong" - add 5000u 0u "Unity.dll" CoverageZone.Method "Collections.Bitwise.FindUpto6bits" - add 5000u 0u "Unity.dll" CoverageZone.Method "xxHash3.Hash64Internal" - add 5000u 0u "Unity.dll" CoverageZone.Method "ObserverManager.NotifyObservers" - add 5000u 0u "Unity.dll" CoverageZone.Method "PropertyBag.Accept" - add 5000u 0u "Unity.dll" CoverageZone.Method "PropertyBag.AcceptWithSpecializedVisitor" - add 5000u 0u "Unity.dll" CoverageZone.Method "PropertyBag.Register" - add 5000u 0u "Unity.dll" CoverageZone.Method "UnsafeList.InsertRangeWithBeginEnd" - add 5000u 0u "Unity.dll" CoverageZone.Method "UnsafeHashMap.TryRemove" - add 5000u 0u "Unity.dll" CoverageZone.Method "UnsafeHashMap.ResizeExact" + //!!!add 1000u 0u "VSharp.ML.GameMaps.dll" "mergeSort" + //add 20000u 0u "VSharp.ML.GameMaps.dll" "LoanExamBuild" + //add 10000u 0u "VSharp.ML.GameMaps.dll" "multiply_matrix" + //add 10000u 0u "VSharp.ML.GameMaps.dll" "adjoint" + add 5000u 0u "VSharp.ML.GameMaps.dll" "LoanExamBuild" + add 5000u 0u "VSharp.ML.GameMaps.dll" "multiply_matrix" + add 5000u 0u "VSharp.ML.GameMaps.dll" "adjoint" + add 1000u 0u "VSharp.ML.GameMaps.dll" "bridge" + add 1000u 0u "VSharp.ML.GameMaps.dll" "PrimeFactorCount" + //add 10000u 0u "Advanced.Algorithms.dll" "FindLongestPalindrome" + add 5000u 0u "Advanced.Algorithms.dll" "bucketSort" + //add 15000u 0u "Advanced.Algorithms.dll" "GetMaxBiPartiteMatchingMain" + add 5000u 0u "Advanced.Algorithms.dll" "GetMaxBiPartiteMatchingMain" + add 5000u 0u "JetBrains.Lifetimes.dll" "ReactiveEx.AdviseUntil" + add 5000u 0u "JetBrains.Lifetimes.dll" "ReactiveEx.AdviseOnce" + add 5000u 0u "JetBrains.Lifetimes.dll" "Types.ToString" + add 5000u 0u "JetBrains.Lifetimes.dll" "CompactList.Clear" + add 5000u 0u "JetBrains.Lifetimes.dll" "CompactList.GetEnumerator" + add 5000u 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.Contains" + add 5000u 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.CopyTo" + add 5000u 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.GetEnumerator" + add 5000u 0u "JetBrains.Lifetimes.dll" "CopyOnWriteList.IndexOf" + + add 5000u 0u "JetBrains.Lifetimes.dll" "BitHacks.Log2Floor" + add 5000u 0u "JetBrains.Lifetimes.dll" "BitHacks.Log2Ceil" + add 5000u 0u "JetBrains.Lifetimes.dll" "BitHacks.NumberOfBitSet" + + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.AddFirst" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.AddLast" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.ForEachValue" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.PeekFirst" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.PeekLast" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.RemoveLastReferenceEqual" + add 5000u 0u "JetBrains.Lifetimes.dll" "StaticsForType.ReplaceFirst" + + add 5000u 0u "JetBrains.Lifetimes.dll" "Statics.For" + + add 5000u 0u "JetBrains.Lifetimes.dll" "Memory.Barrier" + add 5000u 0u "JetBrains.Lifetimes.dll" "Memory.CopyMemory" + + add 5000u 0u "JetBrains.Lifetimes.dll" "ReactiveEx.AdviseUntil" + add 5000u 0u "JetBrains.Lifetimes.dll" "ReactiveEx.AdviseOnce" + + add 5000u 0u "JetBrains.Lifetimes.dll" "Types.ToString" + add 5000u 0u "JetBrains.Lifetimes.dll" "Types.OptionalTypeInfo" + + add 5000u 0u "JetBrains.Lifetimes.dll" "CollectionEx.ContentHashCode" + add 5000u 0u "JetBrains.Lifetimes.dll" "CollectionEx.TryDequeue" + add 5000u 0u "JetBrains.Lifetimes.dll" "CollectionEx.Enqueued" + + add 5000u 0u "JetBrains.Lifetimes.dll" "SingleThreadScheduler.RunInCurrentStackFrame" + add 5000u 0u "JetBrains.Lifetimes.dll" "SingleThreadScheduler.RunOnSeparateThread" + add 5000u 0u "JetBrains.Lifetimes.dll" "SingleThreadScheduler.CreateOverExisting" + add 5000u 0u "JetBrains.Lifetimes.dll" "SingleThreadScheduler.Queue" + + add 5000u 0u "BizHawk.Emulation.Cores.dll" "LR35902.ExecuteOne" + + add 5000u 0u "Unity.dll" "ShaderStringBuilder.AppendLines" + add 5000u 0u "Unity.dll" "ShaderStringBuilder.Concat" + add 5000u 0u "Unity.dll" "ShaderStringBuilder.Dispose" + add 5000u 0u "Unity.dll" "SlotValueHelper.AreCompatible" + add 5000u 0u "Unity.dll" "HlslTokenizer.GetOperatorToken" + add 5000u 0u "Unity.dll" "HlslTokenizer.ParseNumericLiteral" + add 5000u 0u "Unity.dll" "HlslTokenizer.Init" + add 5000u 0u "Unity.dll" "PartialDerivUtilWriter.MakeBinaryFunc" + add 5000u 0u "Unity.dll" "PartialDerivUtilWriter.MakeSingleFunc" + add 5000u 0u "Unity.dll" "PartialDerivUtilWriter.MakeImplicitCast" + add 5000u 0u "Unity.dll" "PartialDerivUtilWriter.GenerateDefinitionsAndFuncs" + add 5000u 0u "Unity.dll" "HlslParser.ParseStruct" + add 5000u 0u "Unity.dll" "HlslParser.ParseStatement" + add 5000u 0u "Unity.dll" "HlslGenerator.MarkApdNodesAndVariablesIsLegal" + add 5000u 0u "Unity.dll" "HlslGenerator.CalculateApdDependenciesRecurse" + add 5000u 0u "Unity.dll" "HlslGenerator.GenerateNodeExpression" + add 5000u 0u "Unity.dll" "Collections.Bitwise.FindUlong" + add 5000u 0u "Unity.dll" "Collections.Bitwise.FindUpto6bits" + add 5000u 0u "Unity.dll" "xxHash3.Hash64Internal" + add 5000u 0u "Unity.dll" "ObserverManager.NotifyObservers" + add 5000u 0u "Unity.dll" "PropertyBag.Accept" + add 5000u 0u "Unity.dll" "PropertyBag.AcceptWithSpecializedVisitor" + add 5000u 0u "Unity.dll" "PropertyBag.Register" + add 5000u 0u "Unity.dll" "UnsafeList.InsertRangeWithBeginEnd" + add 5000u 0u "Unity.dll" "UnsafeHashMap.TryRemove" + add 5000u 0u "Unity.dll" "UnsafeHashMap.ResizeExact" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.DropCollection" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.RenameCollection" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.Delete" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.EnsureIndex" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.DropIndex" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.Insert" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.Rebuild" - add 5000u 0u "LiteDB.dll" CoverageZone.Method "LiteEngine.Update" + add 5000u 0u "LiteDB.dll" "LiteEngine.DropCollection" + add 5000u 0u "LiteDB.dll" "LiteEngine.RenameCollection" + add 5000u 0u "LiteDB.dll" "LiteEngine.Delete" + add 5000u 0u "LiteDB.dll" "LiteEngine.EnsureIndex" + add 5000u 0u "LiteDB.dll" "LiteEngine.DropIndex" + add 5000u 0u "LiteDB.dll" "LiteEngine.Insert" + add 5000u 0u "LiteDB.dll" "LiteEngine.Rebuild" + add 5000u 0u "LiteDB.dll" "LiteEngine.Update" trainMaps, validationMaps diff --git a/VSharp.ML.GameServer/Messages.fs b/VSharp.ML.GameServer/Messages.fs index 583879f78..a6d1739bc 100644 --- a/VSharp.ML.GameServer/Messages.fs +++ b/VSharp.ML.GameServer/Messages.fs @@ -15,8 +15,10 @@ type IRawOutgoingMessageBody = interface end type [] test type [] error - +type [] step +type [] percent type [] basicBlockGlobalId +type [] instruction [] type GameOverMessageBody = @@ -61,10 +63,12 @@ type InputMessage = type StateHistoryElem = val GraphVertexId: uint val NumOfVisits: uint - new (graphVertexId, numOfVisits) = + val StepWhenVisitedLastTime: uint + new (graphVertexId, numOfVisits, stepWhenVisitedLastTime) = { GraphVertexId = graphVertexId NumOfVisits = numOfVisits + StepWhenVisitedLastTime = stepWhenVisitedLastTime } type [] stateId @@ -73,60 +77,66 @@ type [] stateId type State = val Id: uint val Position: uint - val PredictedUsefulness: float val PathConditionSize: uint val VisitedAgainVertices: uint val VisitedNotCoveredVerticesInZone: uint val VisitedNotCoveredVerticesOutOfZone: uint + val StepWhenMovedLastTime: uint + val InstructionsVisitedInCurrentBlock: uint val History: array val Children: array> new(id, - position, - predictedUsefulness, + position, pathConditionSize, visitedAgainVertices, visitedNotCoveredVerticesInZone, visitedNotCoveredVerticesOutOfZone, + stepWhenMovedLastTime, + instructionsVisitedInCurrentBlock, history, children) = { Id = id Position = position - PredictedUsefulness = predictedUsefulness PathConditionSize = pathConditionSize VisitedAgainVertices = visitedAgainVertices VisitedNotCoveredVerticesInZone = visitedNotCoveredVerticesInZone VisitedNotCoveredVerticesOutOfZone = visitedNotCoveredVerticesOutOfZone + StepWhenMovedLastTime = stepWhenMovedLastTime + InstructionsVisitedInCurrentBlock = instructionsVisitedInCurrentBlock History = history Children = children } [] type GameMapVertex = - val Uid: uint val Id: uint val InCoverageZone: bool val BasicBlockSize: uint val CoveredByTest: bool val VisitedByState: bool val TouchedByState: bool + val ContainsCall: bool + val ContainsThrow: bool val States: uint[] - new (uid, - id, + new (id, inCoverageZone, basicBlockSize, + containsCall, + containsThrow, coveredByTest, visitedByState, touchedByState, states) = { - Uid = uid Id = id InCoverageZone = inCoverageZone BasicBlockSize = basicBlockSize CoveredByTest = coveredByTest VisitedByState = visitedByState TouchedByState = touchedByState + ContainsCall = containsCall + ContainsThrow = containsThrow States = states } @@ -159,8 +169,8 @@ type MoveReward = val ForCoverage: uint val ForVisitedInstructions: uint new (forCoverage, forVisitedInstructions) = {ForCoverage = forCoverage; ForVisitedInstructions = forVisitedInstructions} -[] +[] type Reward = interface IRawOutgoingMessageBody val ForMove: MoveReward @@ -173,31 +183,33 @@ type Feedback = | IncorrectPredictedStateId of uint | ServerError of string -type CoverageZone = - | Method = 0 - | Class = 1 - -type [] step -type [] percent - [] type GameMap = val Id: uint val MaxSteps: uint val CoverageToStart: uint val AssemblyFullName: string - val CoverageZone: CoverageZone val NameOfObjectToCover: string val MapName: string - new (id, maxSteps, coverageToStart, assembly, coverageZone, objectToCover) = + new (id, maxSteps, coverageToStart, assembly, objectToCover) = { Id = id MaxSteps = maxSteps CoverageToStart = coverageToStart AssemblyFullName = assembly - CoverageZone = coverageZone NameOfObjectToCover = objectToCover - MapName = $"{objectToCover}_{coverageZone}_{coverageToStart}" + MapName = $"{objectToCover}_{coverageToStart}" + } + + [] + new (id, maxSteps, coverageToStart, assemblyFullName, nameOfObjectToCover, mapName) = + { + Id = id + MaxSteps = maxSteps + CoverageToStart = coverageToStart + AssemblyFullName = assemblyFullName + NameOfObjectToCover = nameOfObjectToCover + MapName = mapName } [] diff --git a/VSharp.SILI/CILState.fs b/VSharp.SILI/CILState.fs index faaa3c40a..7ce9a30d5 100644 --- a/VSharp.SILI/CILState.fs +++ b/VSharp.SILI/CILState.fs @@ -6,6 +6,7 @@ open System.Collections.Generic open VSharp.Core open VSharp.Interpreter.IL open IpOperations +open VSharp.ML.GameServer.Messages module CilState = @@ -104,11 +105,13 @@ module CilState = /// /// Deterministic state id. /// - mutable internalId : uint + mutable internalId : uint mutable visitedAgainVertices: uint mutable visitedNotCoveredVerticesInZone: uint mutable visitedNotCoveredVerticesOutOfZone: uint - mutable _history: Dictionary + mutable stepWhenMovedLastTime: uint + mutable instructionsVisitedInCurrentBlock: uint + mutable _history: Dictionary mutable children: list } @@ -136,6 +139,8 @@ module CilState = visitedAgainVertices = 0u visitedNotCoveredVerticesInZone = 0u visitedNotCoveredVerticesOutOfZone = 0u + stepWhenMovedLastTime = 0u + instructionsVisitedInCurrentBlock = 0u _history = Dictionary() children = [] } @@ -486,7 +491,12 @@ module CilState = member x.Copy(state : state) = let historyCopy = Dictionary<_,_>() for kvp in x._history do historyCopy.Add(kvp.Key, kvp.Value) - { x with state = state ;internalId = getNextStateId(); children = []; _history = historyCopy } + { x with state = state + internalId = getNextStateId() + children = [] + _history = historyCopy + stepWhenMovedLastTime = x.stepWhenMovedLastTime + } // This function copies cilState, instead of mutation member x.ChangeState state' : cilState = @@ -506,10 +516,14 @@ module CilState = override this.CodeLocation = this.approximateLoc override this.CallStack = Memory.StackTrace this.state.stack |> List.map (fun m -> m :?> Method) override this.Id = this.internalId - override this.PathConditionSize with get () = 1u //PersistentSet.cardinality this.state.pc |> uint32 + override this.PathConditionSize with get () = PersistentSet.cardinality this.state.pc |> uint32 override this.VisitedAgainVertices with get () = this.visitedAgainVertices override this.VisitedNotCoveredVerticesInZone with get () = this.visitedNotCoveredVerticesInZone override this.VisitedNotCoveredVerticesOutOfZone with get () = this.visitedNotCoveredVerticesOutOfZone + override this.StepWhenMovedLastTime with get () = this.stepWhenMovedLastTime + override this.InstructionsVisitedInCurrentBlock + with get() = this.instructionsVisitedInCurrentBlock + and set v = this.instructionsVisitedInCurrentBlock <- v override this.History with get () = this._history override this.Children with get () = this.children |> Seq.cast<_> |> Array.ofSeq diff --git a/VSharp.Test/Benchmarks/Benchmarks.cs b/VSharp.Test/Benchmarks/Benchmarks.cs index 43defe62c..e0da63033 100644 --- a/VSharp.Test/Benchmarks/Benchmarks.cs +++ b/VSharp.Test/Benchmarks/Benchmarks.cs @@ -95,7 +95,7 @@ public static BenchmarkResult Run( coverageToSwitchToAI:0, stepsToPlay:0, serialize:false, - pathToSerialize:null + mapName:null ); var fuzzerOptions = new FuzzerOptions( diff --git a/VSharp.Test/IntegrationTests.cs b/VSharp.Test/IntegrationTests.cs index 3ce71668a..bb06bb11a 100644 --- a/VSharp.Test/IntegrationTests.cs +++ b/VSharp.Test/IntegrationTests.cs @@ -467,7 +467,7 @@ private TestResult Explore(TestExecutionContext context) coverageToSwitchToAI:0, stepsToPlay:0, serialize:_serialize, - pathToSerialize:_pathToSerialize + mapName:_pathToSerialize ); var fuzzerOptions = new FuzzerOptions(