Git Product home page Git Product logo

harpo's Issues

Interface Translation

Interfaces translated into constants in Boogie.

(interface MyInterface interface)

Translated to: const unique MyInterface: ClassName

Thread Body Translation

Apparently, thread body contains following commands and expressions. I'll move them out one by one into a separate issue for each.
(1) If expression translation – Some commands and statement translation
(2) While statement translation - Some commands and statement translation
(3) For statement translation - Some commands and statement translation
(4) Assignment translation
(a) Expression Translation
(5) Expression translation
(6) Method Call translation
(7) Co statement translation
(8) Assert/assume translation

Verification Errors

OutputBuilder contains the errors set on supplied coordinated of the source file. We need mapping of verification errors to HARPO's errors.

Types (Primitive Types, References to Objects, arrays)

HARPO Types are converted into Boogie Types according to following Map:
Int8 -> int
Int16 -> int
Int32 -> int
Int64 -> int
Real16 -> real
Real32 -> real
Real64 -> real
bool -> bool
CName -> Ref where CName is a reference to an instance of a class
Perm (Real(*)) -> Perm (real) (We are not using Perm types so far in HARPO, we are using Real types in HARPO to represent the permissions)
[T[N]] -> ArrayRef Tr[T]

Initialization Expressions for Heap left in another Issue.

Class Fields Translation

All fields of class are translated into
Heap[This_ClassName, FieldName] := Initialization Expression.

All fields are initialized in constructor procedure of Boogie.

ObjectIdentifierCodeGeneration() method create the boogie variables of the objects in the beginning of the translated code.

if Field is constant then field declared declared and const unique ClassName.FieldName : Field Type;
axiom ClassName.FieldName == ConstValue.

All local fields are promoted to class fields.

Class Translation

Translation of HARPO Class declaration into Boogie.

const unique C: ClassName;

unique modifier declares that the value of the constant differs from other unique constants.

Class Implementing an interface :
<: used to represent subtyping in Boogie

(class C implements I)

const unique C:ClassName < I;

Class Claim specification

Claim LocSet@PM

Implement the permission map using:
LocSet has two concrete cases:

-> ObjectIdLSN (exp: ExpNd)
-> ArrayLSN (forDecl: ForDecl,offSet: ExpNd,bound: ExpNd, boundInclusive: Boolean, locSet: LocSetNd)

Local Object Translation

local objects declaration and initialization need to be translated into modeled memory(Heap) with permissions on initialization.

Local Fields are promoted to class Fields Translation is similar Class Field Translation.

Unit Tests

"generate Boogie code for HARPO Class Declaration "
"generate Boogie code for HARPO Interface Declaration "
"generate Boogie code for HARPO Object Declaration/Initialization "
"generate Boogie code for HARPO Constant Declaration"
"generate Boogie code for HARPO Field Declaration"
"generate Boogie code for HARPO Boolean Expression"
"generate Boogie code for HARPO Chain Expression "
"generate Boogie code for HARPO Arithmetic Expression"
"generate Boogie code for HARPO Assignment Command"
"generate Boogie code for HARPO While Command"
"generate Boogie code for HARPO For Command"
"generate Boogie code for HARPO if Expression"
"generate Boogie code for HARPO Thread Declaration"
"generate Boogie code for HARPO Method Declaration"
"generate Boogie code for HARPO Method Call"
"generate Boogie code for HARPO Class Constructor"
"generate Boogie code for HARPO Co Command"

Constants Translation

Constants are translated into constants in Boogie.
Constant declaration enforce axiom.

const C: Int32 := 30;

boogie:
const C: int;
axiom C == 10;

"Scenario 3" Translation

The client starts two server threads but finishing one of them, in turn, finish the one who left.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.