JetBrains-Research / HumanEval-Dafny

Translating humaneval into dafny
Apache License 2.0
4 stars 1 forks source link

006-parse_nested_parens does not validate that the computed depth is correct #43

Open jesyspa opened 2 weeks ago

jesyspa commented 2 weeks ago

The algorithm checks only that the depth is non-negative. res := []; would be a valid implementation.

Possible strengthenings:

Note that this may require strengthening the precondition to ensure that the string really does consist of a number of groups.