I am new to Dafny and wrote two methods, switch and sort. In sort I get an error in line 10 and 12 and in switch in line 24 and 26. Both based on the ...
I am new to Dafny and wrote two methods, switch and sort. In sort I get an error in line 10 and 12 and in switch in line 24 and 26. Both based on the ...
I am new to graph database and stuck with the following issue. I'm trying to store below conditional information in the graph. when a=1 and b=2 th ...
in last exam, I've had question, I was unable to answer sanely. Question was "what problems might arise from too weak precondition?" Another questio ...
I'm studying for my Dafny exam and I don't know what's wrong with my code. I think it has something to do with my "index out of range" error but I do ...
I have been reading into the topic of Design By Contract and so far have the following notes written: I would like to confirm an example to clarify ...
Are the following two OCL statements equivalent for some function context? post: if a > 0 then b < c post: b < c implies a > 0 ...
I have a function in a programming language, e.g. C. I require the output of the function to meet a certain condition. If there is some input to this ...
I have a mutable object which I populate with data. Once all the mandatory data is present, the object can be “committed”. Attempting to commit an inc ...
Question that makes me think: when we speak of precondition in a method we refer to a condition verified by the method itself(1) or to a condition ve ...
I have been working on some basic programs in c to verify using the frama-c tool.I wanted to know why the assertion is not being proved in the program ...
Is there a way to specify a custom error/on failure message for pre- and postconditions, by analogy with Predicate_Failure for predicates? I can't see ...
I am trying to learn on my own pre and post conditions in ada. ...
I'm writing up some simple code for a class which intializes baseball runs to 0. Its only method is supposed to take in the number of runs as its para ...
I have an assignment that requires me to create an empty linked list key: LINKED_LIST [KEY], another linked list data_items_1: LINKED_LIST [DATA1] and ...
I have a method that shifts all the items, in an array, to the left by one position. In my post condition I need to ensure that my items have shifted ...
I'm trying to prove the correctness of a method that determines whether a sequence of size n is a permutation of 0,1,...,n-1. I managed to prove that ...
I wonder if there is any tool that automatically generates unit tests based on a method's pre- and post-conditions (and class invariant). To be preci ...
I can understand the meaning and purpose of preconditions in this code but I have a problem in understanding the meaning and purpose of the postcondit ...
My teacher told me the following statement is valid: {x > 3} while true (x := 3) {x = 3} Why is this statement valid? Is it because the post-condi ...
So I'm new to Eiffel programming and I'm trying to learn to write postconditions in the ensure block of a feature, in particular with writing loops. ...