Skip to content

Commit

Permalink
Merge pull request #66 from gradual-verification/loop-perms
Browse files Browse the repository at this point in the history
Properly scope dynamic loop permissions
  • Loading branch information
conradz authored Aug 5, 2024
2 parents bce6556 + 720f140 commit 7f7842f
Show file tree
Hide file tree
Showing 58 changed files with 3,913 additions and 2,790 deletions.
453 changes: 316 additions & 137 deletions src/main/resources/runtime.c0

Large diffs are not rendered by default.

29 changes: 12 additions & 17 deletions src/main/resources/runtime.h0
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,23 @@ struct OwnedFields {
struct FieldArray*[] contents;
int capacity;
int length;
int* instanceCounter;

};

typedef struct OwnedFields OwnedFields;

struct FieldArray {
bool[] contents;
int psl;
int id;
int length;
int _id;
int numAccessible;
bool deleted;
int accessible;
bool[] contents;
};

typedef struct OwnedFields OwnedFields;
typedef struct FieldArray FieldArray;

OwnedFields* initOwnedFields(int * instanceCounter);
int addStructAcc(OwnedFields * fields, int numFields);
void addAcc(OwnedFields * fields, int _id, int numFields, int fieldIndex);
void loseAcc(OwnedFields * fields, int _id, int fieldIndex);
void join(OwnedFields* target, OwnedFields* source);
void assertAcc(OwnedFields* fields, int _id, int fieldIndex, string errorMessage);
void addAccEnsureSeparate(OwnedFields* fields, int _id, int fieldIndex, int numFields, string errorMessage);
FieldArray* find(OwnedFields* fields, int _id);
void printof(OwnedFields* fields);
OwnedFields* runtime_init();
void runtime_addAll(OwnedFields* fields, int id, int numFields);
void runtime_add(OwnedFields* fields, int id, int numFields, int fieldIndex, string errorMessage);
void runtime_remove(OwnedFields* fields, int id, int fieldIndex, string errorMessage);
void runtime_join(OwnedFields* target, OwnedFields* source);
void runtime_assert(OwnedFields* fields, int id, int fieldIndex, string errorMessage);
void runtime_print(OwnedFields* fields);
4 changes: 3 additions & 1 deletion src/main/scala/gvc/analyzer/Resolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ object Resolver {
)
)
),
specifications = f.specifications
// Specifications have already been resolved prior to resolving this
// statement
specifications = List.empty
)
}

Expand Down
Loading

0 comments on commit 7f7842f

Please sign in to comment.