Skip to content

CONTRACTS: Drop (requires|ensures)_contract clauses #7348

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

62 changes: 0 additions & 62 deletions regression/contracts/function-pointer-contracts-enforce/main.c

This file was deleted.

11 changes: 0 additions & 11 deletions regression/contracts/function-pointer-contracts-enforce/test.desc

This file was deleted.

39 changes: 0 additions & 39 deletions regression/contracts/function-pointer-contracts-replace/main.c

This file was deleted.

11 changes: 0 additions & 11 deletions regression/contracts/function-pointer-contracts-replace/test.desc

This file was deleted.

20 changes: 0 additions & 20 deletions src/ansi-c/ansi_c_convert_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,6 @@ void ansi_c_convert_typet::read_rec(const typet &type)
static_cast<const exprt &>(static_cast<const irept &>(type));
requires.push_back(to_unary_expr(as_expr).op());
}
else if(type.id() == ID_C_spec_requires_contract)
{
const exprt &as_expr =
static_cast<const exprt &>(static_cast<const irept &>(type));
requires_contract.push_back(to_unary_expr(as_expr).op());
}
else if(type.id() == ID_C_spec_assigns)
{
const exprt &as_expr =
Expand All @@ -286,12 +280,6 @@ void ansi_c_convert_typet::read_rec(const typet &type)
static_cast<const exprt &>(static_cast<const irept &>(type));
ensures.push_back(to_unary_expr(as_expr).op());
}
else if(type.id() == ID_C_spec_ensures_contract)
{
const exprt &as_expr =
static_cast<const exprt &>(static_cast<const irept &>(type));
ensures_contract.push_back(to_unary_expr(as_expr).op());
}
else
other.push_back(type);
}
Expand Down Expand Up @@ -341,10 +329,6 @@ void ansi_c_convert_typet::write(typet &type)
if(!requires.empty())
to_code_with_contract_type(type).requires() = std::move(requires);

if(!requires_contract.empty())
to_code_with_contract_type(type).requires_contract() =
std::move(requires_contract);

if(!assigns.empty())
to_code_with_contract_type(type).assigns() = std::move(assigns);

Expand All @@ -354,10 +338,6 @@ void ansi_c_convert_typet::write(typet &type)
if(!ensures.empty())
to_code_with_contract_type(type).ensures() = std::move(ensures);

if(!ensures_contract.empty())
to_code_with_contract_type(type).ensures_contract() =
std::move(ensures_contract);

if(constructor || destructor)
{
if(constructor && destructor)
Expand Down
3 changes: 1 addition & 2 deletions src/ansi-c/ansi_c_convert_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class ansi_c_convert_typet:public messaget
bool constructor, destructor;

// contracts
exprt::operandst assigns, frees, ensures, requires, ensures_contract,
requires_contract;
exprt::operandst assigns, frees, ensures, requires;

// storage spec
c_storage_spect c_storage_spec;
Expand Down
Loading