damp.ekeko.soot.soot documentation

Relations about SOOT whole-program analyses.

soot

(soot ?keyword ?node)
Relation between a SootClass, SootMethod or SootField instance
 ?node and a keyword ?keyword describing its kind. 
 Keyword is one of :class, :method or :field. The instances
 originate from the current Soot model available to Ekeko.

Examples:
;;all SootClass instances
(ekeko* [?c] (soot :class ?c))
;;all SootMethod instances
(ekeko* [?m] (soot :method ?m))

soot-class-constructor-method

(soot-class-constructor-method ?class ?method)
Relation between SootClass instances 
and their SootMethod constructors.

soot-class-field

(soot-class-field ?class ?field)
Relation between SootClass instances ?class 
 and their SootField instances ?field.

Examples:
;;for each class, all fields
(ekeko* [?c ?f] (soot-class-field ?c ?f))

soot-class-initializer-method

(soot-class-initializer-method ?class ?method)
Relation between SootClass instances and 
their static initializer SootMethod.

soot-class-method

(soot-class-method ?class ?method)
Relation between SootClass instances ?class and 
 their SootMethod instances ?method.

Examples:
;;for each class, all methods
(ekeko* [?c ?m] (soot-class-method ?c ?m))

soot-class-name

(soot-class-name ?class ?name)
Relation between SootClass instances ?class 
and their fully qualified name string ?name.

soot-entry-method

(soot-entry-method ?method)
Unifies ?method with the SootMethod instance that was 
used as the entry point for Soot's whole-program analyses.

soot-field-signature

(soot-field-signature ?field ?signature)
Relation between SootField instances ?field 
and their signature string ?signature.

soot-method-body

(soot-method-body ?method ?body)
Relation between active SootMethod 
 instances and their JimpleBody.

Examples: 
;;all methods with an active jimple body
(ekeko* [?m ?b] (soot-method-body ?m ?b))

See also:
API reference of soot.jimple.JimpleBody

soot-method-called-by-method

(soot-method-called-by-method ?m ?caller)
Relation between SootMethod ?m and one of the SootMethod instances ?caller
that invoke ?m.

The relation is computed based on the points-to set of the receiver (i.e., based
on an approximation of the dynamic rather than the static type of the receiver). 

Note that library methods are not included. 

See also: 
Predicate soot-method-calls-method/2 is declaratively equivalent, 
but operationally more efficient when the caller is known and the callees aren't.

soot-method-called-by-unit

(soot-method-called-by-unit ?m ?unit)
Relation between SootMethod ?m and one of the Unit instances ?unit 
it is invoked by.

The relation is computed based on the points-to set of the receiver (i.e., based
on an approximation of the dynamic rather than the static type of the receiver). 

Note that library methods are not included. 

See also: 
Predicate soot-unit-calls-method/2 is declaratively equivalent, 
but operationally more efficient when the unit is known and the method isn't.

soot-method-calls-method

(soot-method-calls-method ?m ?callee)
Relation between SootMethod ?m and one of the SootMethod instances ?callee
that are called from within ?m.

The relation is computed based on the points-to set of the receiver (i.e., based
on an approximation of the dynamic rather than the static type of the receiver). 

Note that library methods are not included. 

See also: 
Predicate soot-method-called-by-method/2 is declaratively equivalent, 
but operationally more efficient when the callee is known and the callers aren't.

soot-method-cfg

(soot-method-cfg ?method ?cfg)
Relation between a SootMethod ?method and its 
  ExceptionUnitGraph control flow graph, in a 
  format that is suitable for being queried 
  using regular path expressions provided by
  the damp.qwal library.
 

  Examples:
  ;;all units on every path through a SOOT control flow graph from an entry point ?entry
  ;;to an exit point ?exit where the exit point uses a value ?defval defined
  ;;by a previous Soot statement ?unit that uses a value ?usedval of type ?keyw
  (ekeko*  [?m ?entry ?exit ?unit ?keyw]
           (l/fresh [?cfg ?defbox ?exitbox ?usebox ?defval ?usedval]
                  (soot-method-cfg-entry ?m ?cfg ?entry)
                  (soot-method-cfg-exit ?m ?cfg ?exit)
                  (qwal ?cfg ?entry ?exit 
                                 []
                                 (q=>*)
                                 (qcurrent [curr] 
                                   (el/equals curr ?unit) 
                                   (soot-unit-defbox ?unit ?defbox) 
                                   (soot-valuebox-value ?defbox ?defval) 
                                   (soot-unit-usebox ?unit ?usebox)
                                   (soot-valuebox-value ?usebox ?usedval) 
                                   (soot-value ?keyw ?usedval))
                                 (q=>+)
                                 (qcurrent [curr]
                                   (el/equals curr ?exit) 
                                   (soot-unit-usebox ?exit ?exitbox) 
                                   (soot-valuebox-value ?exitbox ?defval))))))
See also:
Documentation of the damp.qwal library.
Predicates soot-method-cfg-entry and soot-method-cfg-exit which quantify over the 
Soot heads and tails of the control flow graph.
API reference of soot.toolkits.graph.ExceptionalUnitGraph

soot-method-cfg-entry

(soot-method-cfg-entry ?method ?cfg ?entry)
Relation between a Soot ExceptionalUnitGraph 
(in a format compatible with damp.qwal) and its entry points.

See also:
Binary predicate soot-method-cfg/2
API reference of soot.toolkits.graph.ExceptionalUnitGraph

soot-method-cfg-exit

(soot-method-cfg-exit ?method ?cfg ?exit)
Relational between a Soot ExceptionalUnitGraph
(in a format compatible with damp.qwal) and its exit points.

See also:
Binary predicate soot-method-cfg/2
API reference of soot.toolkits.graph.ExceptionalUnitGraph

soot-method-icfg

(soot-method-icfg ?method ?icfg)
Relation between a SootMethod and the program's interprocedural
control flow graph starting in that method, in a format that is suitable for being
queried using regular path expressions provided by the damp.qwal library.

soot-method-local-must-alias-analysis

(soot-method-local-must-alias-analysis ?m ?a)
Relation between a SootMethod ?m and 
its intra-procedural must alias analysis ?a.

soot-method-local-must-alias-analysis-strong

(soot-method-local-must-alias-analysis-strong ?m ?a)
Relation between a SootMethod ?m and 
its intra-procedural strong must alias analysis ?a.

soot-method-local-must-not-alias-analysis

(soot-method-local-must-not-alias-analysis ?m ?a)
Relation between a SootMethod ?m and 
its intra-procedural must-not alias analysis ?a.

soot-method-name

(soot-method-name ?method ?name)
Relation between SootMethod instances ?method 
and their short name string ?name.

soot-method-signature

(soot-method-signature ?method ?signature)
Relation between SootMethod instances ?method 
and their signature string ?signature.

soot-method-unit-trailing-unit

(soot-method-unit-trailing-unit ?m ?unit ?trailing)
Relation between a SootMethod ?m and two of its units 
such that unit ?trailing comes after ?unit in 
the PatchingChain of its JimpleBody.

soot-method-units

(soot-method-units ?m ?units)
Relation between a SootMethod ?m and the PatchingChain of 
units ?units in its active JimpleBody.

soot-model

(soot-model ?model)
Unifies ?model with the current Soot model available to Ekeko,
or fails when there is currently none.

soot-model-scene

(soot-model-scene ?model ?scene)
Relation between the current Soot model ?model and its scene.

See also:
API documentation of soot.Scene
Unary predicate soot-model/1

soot-unit

(soot-unit ?keyw ?u)
Relation between soot unit ?u and a keyword ?keyw describing its kind.
The instances originate from the current Soot model available to Ekeko.

See also: 
API documentation of soot.Unit

soot-unit-assign-leftop

(soot-unit-assign-leftop ?u ?local)
Relation between the soot JAssignStmt unit ?u 
and its left operand ?local.

soot-unit-assign-rightop

(soot-unit-assign-rightop ?u ?local)
Relation between the soot JAssignStmt unit ?u 
and its right operand ?local.

soot-unit-calls-method

(soot-unit-calls-method ?unit ?m)
Relation between Unit ?unit and one of the SootMethod instances ?m
it may invoke. 

The relation is computed based on the points-to set of the receiver (i.e., based
on an approximation of the dynamic rather than the static type of the receiver). 

Note that library methods are not included. 

See also: 
Predicate soot-method-called-by-unit/2 is declaratively equivalent, 
but operationally more efficient when the method is known and the unit isn't.

soot-unit-defbox

(soot-unit-defbox ?u ?b)
Relation between a soot Unit ?u and one of the ValueBox instances it defines.

See also:
predicate soot-unit-usebox/2

soot-unit-usebox

(soot-unit-usebox ?u ?b)
Relation between a soot Unit ?u and one of the ValueBox instances it uses.

See also:
predicate soot-unit-defbox/2

soot-value

(soot-value ?keyw ?v)
Non-relational. Unifies ?keyw with the keyword 
that represents the kind of the soot Value ?v.

soot-valuebox

(soot-valuebox ?b)
Non-relational. Verifies that ?b is a soot ValueBox.

soot-valuebox-value

(soot-valuebox-value ?b ?v)
Non-relational. Unifies ?v with the Value inside the ValueBox ?b.

soot|method-soot|unit

(soot|method-soot|unit ?m ?unit)
Relation between a SootMethod ?m and one of the units ?unit
in its active JimpleBody.

soot|unit|reads-soot|field

(soot|unit|reads-soot|field ?unit ?field)
Relation between a Soot unit and the Soot field it reads from.

soot|unit|writes-soot|field

(soot|unit|writes-soot|field ?unit ?field)
Relation between a Soot unit and the Soot field it writes to.