Skip to content

Improve diagnostics for MethodCallExpression#1

Draft
kfcripps wants to merge 741 commits intoimprove-diagnostics-assignmentstmt-opbin-listexpr-structexptfrom
improve-diagnostics-mce
Draft

Improve diagnostics for MethodCallExpression#1
kfcripps wants to merge 741 commits intoimprove-diagnostics-assignmentstmt-opbin-listexpr-structexptfrom
improve-diagnostics-mce

Conversation

@kfcripps
Copy link
Owner

No description provided.

@kfcripps
Copy link
Owner Author

fruffy and others added 29 commits May 12, 2023 19:40
)

* Start with adding table entry coverage to the coverage collector.

* Fix a typo.
…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
…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.
fruffy and others added 6 commits January 30, 2024 18:54
… 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>
@kfcripps kfcripps force-pushed the improve-diagnostics-mce branch 3 times, most recently from 5b361f5 to a9a2d63 Compare February 5, 2024 16:00
mihaibudiu and others added 9 commits February 5, 2024 12:12
)

Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
…#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
@kfcripps kfcripps force-pushed the improve-diagnostics-mce branch from a9a2d63 to 04037a7 Compare February 7, 2024 20:48
@kfcripps kfcripps force-pushed the improve-diagnostics-mce branch from 5761f2d to 43f81a6 Compare February 7, 2024 23:09
@kfcripps kfcripps force-pushed the improve-diagnostics-mce branch from 1ad301c to fe246a7 Compare February 8, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.