Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LARA
inox
Commits
1b68030e
Commit
1b68030e
authored
14 years ago
by
Ali Sinan Köksal
Browse files
Options
Downloads
Patches
Plain Diff
Some renaming.
parent
8e6b985d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/funcheck/CallTransformation.scala
+4
-4
4 additions, 4 deletions
src/funcheck/CallTransformation.scala
src/funcheck/CodeGeneration.scala
+6
-6
6 additions, 6 deletions
src/funcheck/CodeGeneration.scala
src/funcheck/Serialization.scala
+1
-3
1 addition, 3 deletions
src/funcheck/Serialization.scala
with
11 additions
and
13 deletions
src/funcheck/CallTransformation.scala
+
4
−
4
View file @
1b68030e
...
...
@@ -32,16 +32,16 @@ trait CallTransformation
println
(
"Here is the extracted FunDef:"
)
println
(
fd
)
val
codeGen
=
new
CodeGenerator
(
unit
,
currentOwner
)
fd
.
body
match
{
case
None
=>
println
(
"Could not extract choose predicate: "
+
funBody
);
super
.
transform
(
tree
)
case
Some
(
b
)
=>
val
exprFilename
=
writeExpr
(
b
)
val
(
programGet
,
progSym
)
=
codeGen
.
ge
nerate
Program
Get
(
programFilename
)
val
(
exprGet
,
exprSym
)
=
codeGen
.
ge
nerate
Expr
Get
(
exprFilename
)
val
solverInvocation
=
codeGen
.
generateSolverInvocation
(
b
,
progSym
,
exprSym
)
val
(
programGet
,
progSym
)
=
codeGen
.
ge
t
Program
(
programFilename
)
val
(
exprGet
,
exprSym
)
=
codeGen
.
ge
t
Expr
(
exprFilename
)
val
solverInvocation
=
codeGen
.
invokeSolver
(
b
,
progSym
,
exprSym
)
val
code
=
Block
(
programGet
::
exprGet
::
Nil
,
solverInvocation
)
typer
.
typed
(
atOwner
(
currentOwner
)
{
...
...
This diff is collapsed.
Click to expand it.
src/funcheck/CodeGeneration.scala
+
6
−
6
View file @
1b68030e
...
...
@@ -28,7 +28,7 @@ trait CodeGeneration {
class
CodeGenerator
(
unit
:
CompilationUnit
,
owner
:
Symbol
)
{
def
ge
nerate
Program
Get
(
filename
:
String
)
:
(
Tree
,
Symbol
)
=
{
def
ge
t
Program
(
filename
:
String
)
:
(
Tree
,
Symbol
)
=
{
val
progSymbol
=
owner
.
newValue
(
NoPosition
,
unit
.
fresh
.
newName
(
NoPosition
,
"prog"
)).
setInfo
(
programClass
.
tpe
)
val
getStatement
=
ValDef
(
...
...
@@ -47,7 +47,7 @@ trait CodeGeneration {
(
getStatement
,
progSymbol
)
}
def
ge
nerate
Expr
Get
(
filename
:
String
)
:
(
Tree
,
Symbol
)
=
{
def
ge
t
Expr
(
filename
:
String
)
:
(
Tree
,
Symbol
)
=
{
val
exprSymbol
=
owner
.
newValue
(
NoPosition
,
unit
.
fresh
.
newName
(
NoPosition
,
"expr"
)).
setInfo
(
exprClass
.
tpe
)
val
getStatement
=
ValDef
(
...
...
@@ -66,7 +66,7 @@ trait CodeGeneration {
(
getStatement
,
exprSymbol
)
}
def
generateSolverInvocation
(
formula
:
Expr
,
progSymbol
:
Symbol
,
exprSymbol
:
Symbol
)
:
Tree
=
{
def
invokeSolver
(
formula
:
Expr
,
progSymbol
:
Symbol
,
exprSymbol
:
Symbol
)
:
Tree
=
{
val
solverSymbol
=
owner
.
newValue
(
NoPosition
,
unit
.
fresh
.
newName
(
NoPosition
,
"solver"
)).
setInfo
(
fairZ3SolverClass
.
tpe
)
val
solverDeclaration
=
ValDef
(
...
...
@@ -102,9 +102,9 @@ trait CodeGeneration {
)
Block
(
solverDeclaration
::
setProgram
::
invocation
::
Nil
,
Literal
(
Constant
(
0
))
)
solverDeclaration
::
setProgram
::
invocation
::
Nil
,
Literal
(
Constant
(
0
))
)
}
}
}
This diff is collapsed.
Click to expand it.
src/funcheck/Serialization.scala
+
1
−
3
View file @
1b68030e
...
...
@@ -72,6 +72,4 @@ trait Serialization {
}
}
object
Serialization
extends
Serialization
{
}
object
Serialization
extends
Serialization
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment