Questions tagged [b-method]

10 questions
5
votes
2 answers

Is B-Method an alternative to traditional programming languages?

I heard about B-Method which is invented in France. Is it an alternative to traditional programming languages like c++ and java or is it a completely different thing with different purposes?
Alan_AI
  • 1,529
  • 3
  • 22
  • 32
3
votes
3 answers

AMN and math logic notation

I'm not sure this is appropriate for stackoverflow, but I don't know where else to ask. I'm studying the B-Method for proving consistence in requirement specifications, and I have an issue with the logic math notation when specifying the pre…
webdreamer
  • 2,359
  • 3
  • 23
  • 30
2
votes
2 answers

Test a program in b language

I'm not sure this is appropriate for stackoverflow, but I don't know where else to ask. For a program written in b language,(Not the B language, predecessor of C and C++) and i would to know if it's well written, is there a compile or test that i…
richie-torres
  • 746
  • 1
  • 8
  • 29
1
vote
1 answer

How to generate random numbers from 1 to 6 using the B language

I'm working on a project using B language. I want to get a random number from a dice. Dice consist of 6 faces. How to generate random numbers from 1 to 6 using the B language? I found this random number generation from the Specification in B: an…
OshiniRB
  • 578
  • 1
  • 7
  • 21
1
vote
1 answer

Refinement of a B specification

Consider I have the following in B specification :- flower <: FLOWER age <: AGE owner <: OWNER Type <: flower * age Buyer : owner <-> flower Is it possible for me to create a refinement as followed :- flower <: FLOWER age <: AGE owner <: OWNER Type…
1
vote
2 answers

Expressing rules in B-Method

I'm writing some specifications of a system in B-method. I have the following variables which are subsets of a general set: First Notation: a :={x,y,z,v} b :={x,y,z} I want to state a rule that whenever something exists in set "b", it also exists…
Fred
  • 45
  • 4
0
votes
1 answer

Using the B-Method for structured data verification

I'm trying to use the B-Method as an mechanism to formally specify structured data. As in a function that parses a block of bytes representing some data. All the examples I can find are of some form of sequential state machine (train system, control…
Joolsy
  • 1
  • 1
0
votes
1 answer

Atelier B - Proving simple PO in the context of a loop

How can I prove the following invariant holds in the context of a WHILE substitution: INIT = FALSE => size(vv)>0? it seems to generate a blocking PO relating to the loop. Here is the structure of the B project: head.mch MACHINE head SETS …
zb1225
  • 3
  • 3
0
votes
1 answer

Atelier B - Proof obligations of "H => vv$1 = vv$2" format for vv used in WHILE substitution

I am trying to understand Proof Obligations of this format: H => vv$1 = vv$2 vv is a var used in an implementation within a WHILE substitution. What does this PO mean and how to prove it? Thanks Here is the structure of the B project: machines…
zb1225
  • 3
  • 3
0
votes
1 answer

Formal Systems Specification in AtelierB - Lhs of binary operator should be a sequence (given type is POW(POW(INTEGERS * ORDERs)))

I am trying to develop a B specification for a small stock management system and I am battling with the error: Lhs of binary operator should be a sequence (given type is POW(POW(INTEGERS * ORDERs))) This is my Abstract Machine: MACHINE …