1// Copyright 2021 The Tint Authors. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package tint.fuzzers.ast_fuzzer.protobufs; 18 19message Mutation { 20 oneof mutation { MutationReplaceIdentifier replace_identifier = 1; }; 21} 22 23message MutationSequence { 24 repeated Mutation mutation = 1; 25} 26 27message MutatorState { 28 // Contains the state of the fuzzer. 29 30 // The program that is being fuzzed. This can be either 31 // the original program (if mutation sequence is available) or 32 // the mutated version (if mutations are being recorded). 33 string program = 1; 34 35 // The sequence of mutations that was applied to the `program`. 36 // This may not have any mutations if they are not being recorded. 37 MutationSequence mutation_sequence = 2; 38} 39 40message MutationReplaceIdentifier { 41 // This transformation replaces a use of one variable with another. 42 43 // The id of the use of a variable in the AST. 44 uint32 use_id = 1; 45 46 // The id of a definition of a variable to replace the use with. 47 uint32 replacement_id = 2; 48} 49