Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: symbolic collections #19

Closed
wants to merge 1 commit into from
Closed

Conversation

Saloed
Copy link
Collaborator

@Saloed Saloed commented May 23, 2023

Extend heap with SymbolicMap

  • works like a symbolic array with an arbitrary key
  • provides copySymbolicMapIndexRange operation for maps with an Index key that acts like a memcpy
  • provides mergeSymbolicMap that merge one map into another (key union, values overwrite when intersect)

SymbolicMap has Allocated and Input region ids, which are parametrized with SymbolicMapDescriptor. This representaion allow extensibility because when a map with a new key sort is required we only need to define a new descriptor.

Intrinsics

  • ObjectMap --- map with object (reference) keys. Currently, use reference equality and act like a java.util.IdentityHashMap
  • List --- list, dynamic array, vector, etc.
  • Engine --- allows usvm state manipulation: assume, makeSymbolic

@Saloed Saloed force-pushed the saloed/symbolic-collections branch from dbf32b1 to 0336c08 Compare May 24, 2023 08:09
@Saloed Saloed requested a review from dvvrd May 24, 2023 08:35
@Saloed Saloed force-pushed the saloed/symbolic-collections branch from 121f757 to 905ac2a Compare May 25, 2023 13:18
import org.usvm.memory.USymbolicObjectReferenceMapDescriptor
import org.usvm.sampleUValue

object SymbolicObjectMapUtils {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think about hierarchy of intrinsics.

import org.usvm.util.Region
import org.usvm.util.SetRegion

abstract class USymbolicMapDescriptor<Key : USort, Value : USort, Reg : Region<Reg>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think about unifying regionId and symbolicMapDescriptor

@Saloed Saloed force-pushed the saloed/symbolic-collections branch 2 times, most recently from 7d8f17d to c2e740c Compare June 9, 2023 12:41
@Saloed Saloed force-pushed the saloed/symbolic-collections branch from c2e740c to 06a912b Compare June 16, 2023 07:58
@Saloed Saloed force-pushed the saloed/symbolic-collections branch from 76c15e4 to 41290da Compare July 12, 2023 07:33
@Saloed Saloed closed this Aug 29, 2023
@Saloed Saloed deleted the saloed/symbolic-collections branch September 6, 2023 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants