Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sut as type argument or inside tuple #245

Merged
merged 3 commits into from
Jul 29, 2024

Conversation

nikolaushuber
Copy link
Contributor

@nikolaushuber nikolaushuber commented Jul 22, 2024

Fixes a bug were we are not checking for the sut type being used as the instantiation of a type variable or inside a tuple, so for example

val test : 'a t list -> int
(*@ r = test ts
    ensures r = List.length ts *)

would type check correctly and create incorrect code.

This should raise an error but currently just produces incorrect code
@nikolaushuber nikolaushuber changed the title Sut as type inst Sut as type argument or inside tuple Jul 24, 2024
@nikolaushuber nikolaushuber force-pushed the sut-as-type-inst branch 2 times, most recently from 3f39cbd to 5063af2 Compare July 25, 2024 11:43
Copy link
Collaborator

@n-osborne n-osborne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, thanks!

Just had some tiny remarks, but after that it is good to merge.

nikolaushuber and others added 2 commits July 29, 2024 14:27
Co-authored-by: Nicolas Osborne <nicolas.osborne@tarides.com>
@n-osborne n-osborne merged commit 8b23969 into ocaml-gospel:main Jul 29, 2024
3 checks passed
n-osborne added a commit to n-osborne/opam-repository that referenced this pull request Oct 8, 2024
This release brings a number of new features and improvements:

- New features:
  + [ocaml#247](ocaml-gospel/ortac#247): Generated tests cover now functions with multiple SUT arguments
  + [ocaml#253](ocaml-gospel/ortac#253): Generated tests cover now functions returning SUT values
  + [ocaml#259](ocaml-gospel/ortac#259): Generated tests can be run in a separated process with a timeout
- Improvements:
  + [ocaml#245](ocaml-gospel/ortac#245): Fix the analysis of function signature to explicitly not support SUTs inside
    another type
  + [ocaml#251](ocaml-gospel/ortac#251): Fix the display of the runnable scenario for value returned by a function
    that could have raised an exception
n-osborne added a commit to n-osborne/opam-repository that referenced this pull request Oct 8, 2024
This release brings a number of new features and improvements:

- New features:
  + [ocaml#247](ocaml-gospel/ortac#247): Generated tests cover now functions with multiple SUT arguments
  + [ocaml#253](ocaml-gospel/ortac#253): Generated tests cover now functions returning SUT values
  + [ocaml#259](ocaml-gospel/ortac#259): Generated tests can be run in a separated process with a timeout
- Improvements:
  + [ocaml#245](ocaml-gospel/ortac#245): Fix the analysis of function signature to explicitly not support SUTs inside
    another type
  + [ocaml#251](ocaml-gospel/ortac#251): Fix the display of the runnable scenario for value returned by a function
    that could have raised an exception
n-osborne added a commit to n-osborne/opam-repository that referenced this pull request Oct 10, 2024
This release brings a number of new features and improvements:

- New features:
  + [ocaml#247](ocaml-gospel/ortac#247): Generated tests cover now functions with multiple SUT arguments
  + [ocaml#253](ocaml-gospel/ortac#253): Generated tests cover now functions returning SUT values
  + [ocaml#259](ocaml-gospel/ortac#259): Generated tests can be run in a separated process with a timeout
- Improvements:
  + [ocaml#245](ocaml-gospel/ortac#245): Fix the analysis of function signature to explicitly not support SUTs inside
    another type
  + [ocaml#251](ocaml-gospel/ortac#251): Fix the display of the runnable scenario for value returned by a function
    that could have raised an exception
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.

2 participants