Improve diagnostics for MethodCallExpression#1
Draft
kfcripps wants to merge 741 commits intoimprove-diagnostics-assignmentstmt-opbin-listexpr-structexptfrom
Draft
Improve diagnostics for MethodCallExpression#1kfcripps wants to merge 741 commits intoimprove-diagnostics-assignmentstmt-opbin-listexpr-structexptfrom
MethodCallExpression#1kfcripps wants to merge 741 commits intoimprove-diagnostics-assignmentstmt-opbin-listexpr-structexptfrom
Conversation
Owner
Author
…ctions to IR utilities. Merge default value function. (p4lang#4004) * Small improvements to metadata collection and inja initialization. * Add some more small utility functions. * Merge the default value utility functions. * Also dump information about the parser states that were traversed in the metadata test back end. * Move common test variables to the top level. * Miscellaneous small fixes. * Clean up some issues with node coverage. Use clone idea instead of source info for comparison.
* Refactor the P4Tools CMake test utilities for extensions. * Miscellaneous small fixes.
…ixed. (p4lang#3298) Co-authored-by: DoctorNoobingstoneIPresume <DoctorNoobingstoneIPresume@gmail.com>
p4lang#2571) * Add a simple PSA test program and STF test to verify parser_error operation That is, verify that parser errors caught during ingress parsing are passed to ingress control in standard metadata field, and similarly for parser errors caught during egress parsing. * Fix compile-time error in test program * Update expected output files
- fix ConstructorCall::resolve to work without typeMap when just a ResolutionContext is available
…t cases (p4lang#4008) * Properly track the index when removing parser value sets from the select cases. Improve taint error messages. * Create a p4cgraphs library which can be linked against. * Fix inconsistent snake casing.
…o "common" folder (p4lang#4010) * Move some table code into helper functions. * Move gen_eq into common folder. * Simplify optimizeExpressions.h
…move copy-in/out to control/parser blocks. (p4lang#4011) * Introduce a new abstract execution state class. * Migrate P4Testgen to the new utilities. * Resolve parser states early. Do not resolve them in path expressions. * Optimize copy in and out with new utilities. * Implement basic version of copy-in/out first. * Reduce the number of execution state copies. * Clean up some more helper functions. * Review comments and more clean up. * Ref files.
* Open up the P4Testgen interface. * Remove getPortNumWidthBits from the target and replace it with target-specific constants. * Clean up library management and namespaces and make sure that the final state class can be moved.
Changelog: - [P4Testgen] Open up P4Testgen interface. (4014) [fruffy-bfn] - [P4Testgen] Create abstract execution state with utility functions - move copy-in/out to control/parser blocks. (4011) [Fabian Ruffy] - cmake: Fix include search for Z3 in testgen library (4012) [Vladimír Štill] - [P4Testgen] Move some table code into helper functions, move gen_eq to "common" folder (4010) [Fabian Ruffy] - Properly track indices when removing parser value sets from the select cases (4008) [fruffy-bfn] - Open up ResolutionContext interface a bit (4009) [Chris Dodd] - Add a simple PSA test program and STF test to verify parser_error ope… (2571) [Andy Fingerhut] - lib/crash.cpp: : calls in initializations fixed. (3298) [DoctorNoobingstoneIPresume] - [P4Testgen] More P4Tools refactoring work. (4005) [Fabian Ruffy] - [P4Testgen] Fix small issues with metadata test backend. Add more functions to IR utilities. Merge default value function. (4004) [fruffy-bfn] - [P4Testgen] Also include table entries in the coverage set. (3999) [Fabian Ruffy] - Allowing local_copyprop to propagate MethodCallExpression into table … (4003) [Han Wang] - [P4Testgen] Fix include paths (3997) [Fabian Ruffy] - [P4Testgen] More StateVariable refactoring. Allow PathExpression to be state variables. (3990) [Fabian Ruffy] - Make P4_16 the default parser option. (4002) [Fabian Ruffy] - misc helper functions (3995) [Chris Dodd] - NVFMSA-2399 Fix initialization-order-fiasco of P4CoreLibrary instance (3994) [Chris Dodd] - [P4Testgen] Implement meter support for the BMv2 V1model PTF test back end (3974) [Fabian Ruffy]
p4lang#4023) * Also suppress no-gnu-zero-variadic-macro-arguments warnings for MacOs. * Fix more warnings. * Do not install the latest version of protobuf because of a breaking change.
* Implement support for non-const table entries * Add colon after priority * Priority assignment * P4Runtime should use entry priorities if they exist Signed-off-by: Mihai Budiu <mbudiu@gmail.com>
…ation step instead. (p4lang#4015) * Remove complete from the model. * Execution state refactoring. * Remove createSymbolicVariable entirely and replace it with the static getSymbolicVariable. --------- Co-authored-by: fruffy <fruffy@nyu.edu>
* Add documentation * Add latest pna.p4 * Add main files * Add midend files * Add IR class * Add runtime file * Add backend skeleton * Add testscript and testdata * Add version and CMakelist * Addressed review comments * Addressed more review comments * Addressed review comments
* Simplify the model * Clean up taint handling. * Simplify taint. * Add StringLiterals to the list of accepted Z3 expressions. * Miscellaneous small fixes. * Review comments.
…#4025) * Fixed target_name and action parameter bitwidth * Add utility function for getting Metadata width
* Pin boost. * Link...
…r. Simplify SelectedBranches. (p4lang#4031)
…nterfaces for PTF tests. (p4lang#3951) * Switch to PTF nanomsg. * Make the test script modular. * Small fixes. * Update PTF version.
* Remove ipaddr as dependency Recently behavioral-model simple_switch removed this as a dependency, and it seems like that p4c only needed it because of that. * Remove python-ipaddr packages from ebpf test setup
…neralize FindZ3.cmake (p4lang#4034) * Control the Z3 version P4Testgen uses. Move FindZ3 to common cmake tools. * Review edits. Move Z3 installation to common target. * Add an option to supply a preinstalled Z3 version. * Rename.
…mespaces. (p4lang#4042) * Fix race condition for parallel PTF nanomsg test. * Revert to using namespaces. * Use uuid instead.
… that result from `RemoveRedundantParsers` pass. (p4lang#4368) * Remove unused parser declarations and unused parser type declarations that result from `RemoveRedundantParsers` pass. * Add unit test * Still call RemoveAllUnusedDeclarations before RemoveRedundantParsers and add additional RemoveAllUnusedDeclarations pass to RemoveRedundantParsers.
* Tweak optional CI run execution. * Fix incorrect TC code. * Add a sleep for the BMv2 PTF test.
…in favor of ICastable interface (p4lang#4382) * Eliminate the majority of `dynamic_cast` usage in the codebase in favor of ICastable interface * Produce slightly better error message in case of failed cast * Apply suggestions from code review Co-authored-by: Vladimír Štill <git@vstill.eu> * Apply suggestions from code review Co-authored-by: Vladimír Štill <git@vstill.eu> --------- Co-authored-by: Vladimír Štill <git@vstill.eu>
* Add a P4Runtime API to P4Tools. * Tests and refactoring. * Switch back to pointer based unpacking for now. * Apply fix-its. * Review comments.
Changelog: - Tweak optional CI run execution. (4380) [Fabian Ruffy] - Remove unused parser declarations and unused parser type declarations that result from pass. (4368) [Kyle Cripps] - Remove redundant protobuf installation. (4379) [Fabian Ruffy] - Remove XDP code generated for TC (4349) [vbnogueira] - Use std::allocator_traits::rebind_alloc instead of std::allocator::rebind (4373) [Vladimír Štill] - Support ebpf Hash and Checksum (4378) [Komal Jain] - P4TC - Support const entries (4329) [Komal Jain] - Fixes for MacOS/macports. (4375) [Chris Dodd] - Fix compiler stdin. (4367) [Fabian Ruffy] - Add missing equiv implementation to Type_Any. (4336) [Fabian Ruffy] - Remove options from gtest binary. (4334) [Fabian Ruffy] - Provide hints on how to fix CI complaints. (4355) [Fabian Ruffy] - Improve diagnostics for AssignmentStatement (4360) [Kyle Cripps] - Improve diagnostics for (4358) [Kyle Cripps] - Improve diagnostics for (4357) [Kyle Cripps] - [P4Testgen] Introduce a compiler target for P4Testgen. Move computation from the ProgramInfo to the midend. (4292) [Fabian Ruffy] - Deprecate .txt, support in favour of .txtpb. (4352) [Fabian Ruffy] - [P4Testgen] Introduce the option to produce lowercase hex for the formatting library. (4340) [fruffy-g] - Trigger CI workflows based on assigned label. (4348) [Fabian Ruffy] - Emit the Protobuf header with the P4 entries and runtime files. (4350) [Fabian Ruffy] - DoConstantFolding: make typeMap param const (4346) [Glen Gibb] - Repair the static DPDK PTF tests. (4210) [Fabian Ruffy] - Documentation & testfix follow-up to 4160 (4328) [Thomas Calvert] - cstring: Add string literal suffix, add toLower (4342) [Vladimír Štill] - Allow unknown fields when parsing P4Info files (4341) [Andy Fingerhut] - Convert deparser header to 'inout' and address casting for functions with control block parameters (4338) [Komal Jain] - Step 2: Refactor ProgramInfo to be initialized with CompilerResult instead of a IR::P4Program. (4324) [Fabian Ruffy] - Ignore clang-tidy complaints about macro do-while loops. (4332) [Fabian Ruffy] - Fix build with system Protobuf (4321) [jkhsjdhjs] - [P4Testgen] Extend the CompilerTarget runProgram function with data structures which can pass on more information. (4323) [Fabian Ruffy] - Update status badges (4330) [fruffy-g] - Allow constant-folding of arbitrary-precision integer casts (4325) [Vladimír Štill] - Rename --with-output-packet to --output-packet-only. (4314) [fruffy-g] - Make sure P4 expression optimization does not strip away types (4300) [Vladimír Štill] - Respect ENABLE_LTO even for static build, but keep LTO default for static (4320) [Vladimír Štill] - Allow constructing PassRepeated from a PassManager (4319) [Vladimír Štill] - keep P4Control->body->srcInfo during init move (4317) [Glen Gibb] - [P4Testgen] Implement coverage tracking of actions (4307) [Vladimír Štill] Co-authored-by: rst0git <rst0git@users.noreply.github.com>
5b361f5 to
a9a2d63
Compare
…#4327) * backends/ebpf: Track header start offset in bytes rather than bits. * backends/ebpf: Remove most remaining uses of bits offset var. Uses still remain in ubpf and tc backends. It would be easy to move the variable definition to the uBPFProgram class, however TC uses eBPFProgram directly (without inheritance). ubpf could be changed to use a byte-level header var as was done in eBPF, however it supports bit-level advance() calls. * testdata: Update p4tc golden outputs following offset tracking changes. This patch also sets the executable bit on all .template files. This is done by the TC backend when they are created, however for some reason never made it to the reference outputs, and the checker script doesn't look at permissions.
…4lang#4387) * Small hotfixes to prevent crashes. * Review comments and fixes.
* Avoid possible silent null-deref in Options::usage * Avoid possible silent null-deref in alias.h * Fix null defer in type checking (after type error) * Avoid null pointer deref in convertErrors * Avoid redundant check for null * Make sure diagnostics don't try to dereference null node just to get its source location * Avoid redundant dynamic cast * Fix tautological condition * Avoid closing file with pclose when not preprocessing * Fix "changes" flag initialization
Rename parser C file's eBPF section to "p4tc/parse" and control blocks C file's eBPF section to "p4tc/main".
…. Allow `--Winfo=diagnostic` to work for `diagnostic`s that can be both warnings and errors. (p4lang#4366)
…Methodcall used as table key, to metadata. (p4lang#4383) * Explicitly use method toString() while moving isValid() Methodcall used as table key to metadata * Add check for isValid call * Avoid using toString() in obtaining keynames * Code refactoring for creating keyName, minor fixups
a9a2d63 to
04037a7
Compare
5761f2d to
43f81a6
Compare
…n is a MethodCallExpression
1ad301c to
fe246a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.