-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'xcfa-refactor' into progress-check-refactor
- Loading branch information
Showing
34 changed files
with
274 additions
and
1,618 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
...ects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/mcm/MemoryEvent.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
/* | ||
* Copyright 2023 Budapest University of Technology and Economics | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package hu.bme.mit.theta.analysis.algorithm.mcm | ||
|
||
import hu.bme.mit.theta.core.decl.VarDecl | ||
|
||
|
||
open class MemoryEvent(protected val type: MemoryEventType, protected val tag: String, protected val id: Int) { | ||
|
||
fun tag(): String { | ||
return tag | ||
} | ||
|
||
enum class MemoryEventType(val label: String) { | ||
READ("R"), | ||
WRITE("W"), | ||
FENCE("F"), | ||
META("M") | ||
} | ||
|
||
fun type(): MemoryEventType { | ||
return type | ||
} | ||
|
||
open fun asRead(): Read { | ||
throw UnsupportedOperationException("Not a read!") | ||
} | ||
|
||
open fun asWrite(): Write { | ||
throw UnsupportedOperationException("Not a write!") | ||
} | ||
|
||
open fun asFence(): Fence { | ||
throw UnsupportedOperationException("Not a fence!") | ||
} | ||
|
||
open fun asMemoryIO(): MemoryIO { | ||
throw UnsupportedOperationException("Not memory IO!") | ||
} | ||
|
||
abstract class MemoryIO(id: Int, private val `var`: VarDecl<*>, private val localVar: VarDecl<*>, | ||
type: MemoryEventType, tag: String) : | ||
MemoryEvent(type, tag, id) { | ||
|
||
override fun asMemoryIO(): MemoryIO { | ||
return this | ||
} | ||
|
||
override fun toString(): String { | ||
return type.toString() + "{" + | ||
"var=" + `var` + | ||
", localVar=" + localVar + | ||
", tag=" + tag + | ||
", id=" + id + | ||
'}' | ||
} | ||
|
||
fun `var`(): VarDecl<*> { | ||
return `var` | ||
} | ||
|
||
fun localVar(): VarDecl<*> { | ||
return localVar | ||
} | ||
} | ||
|
||
class Read(id: Int, `var`: VarDecl<*>, localVar: VarDecl<*>, tag: String) : | ||
MemoryIO(id, `var`, localVar, MemoryEventType.READ, tag) { | ||
|
||
override fun asRead(): Read { | ||
return this | ||
} | ||
} | ||
|
||
class Write(id: Int, `var`: VarDecl<*>, localVar: VarDecl<*>, private val dependencies: Set<VarDecl<*>>, | ||
tag: String) : | ||
MemoryIO(id, `var`, localVar, MemoryEventType.WRITE, tag) { | ||
|
||
override fun asWrite(): Write { | ||
return this | ||
} | ||
|
||
fun dependencies(): Set<VarDecl<*>> { | ||
return dependencies | ||
} | ||
} | ||
|
||
class Fence(id: Int, tag: String) : MemoryEvent(MemoryEventType.FENCE, tag, id) { | ||
|
||
override fun asFence(): Fence { | ||
return this | ||
} | ||
|
||
override fun toString(): String { | ||
return type.toString() + "{" + | ||
"tag='" + tag + '\'' + | ||
'}' | ||
} | ||
} | ||
} |
101 changes: 0 additions & 101 deletions
101
...analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/mcm/analysis/ExecutionGraph.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
...sis/src/main/java/hu/bme/mit/theta/analysis/algorithm/mcm/mcm/EncodedRelationWrapper.java
This file was deleted.
Oops, something went wrong.
56 changes: 0 additions & 56 deletions
56
...alysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/mcm/mcm/EventConstantLookup.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.