Commit Graph

4301 Commits

Author SHA1 Message Date
Tobias Blaschke 326404ff53 Fix: Instantiator - Array of Interface caused endless recursion
When creating an instance of an array whose payload-type is an interface
the Instantiator would get stuck in an endless recursion.
2014-04-11 17:53:12 +02:00
Tobias Blaschke f261d2e9ab Dalvik: Mark files for deletion
Classes not needed any longer have been marked as @deprecated
2014-04-11 17:53:12 +02:00
Tobias Blaschke 80c022f525 AndroidContext: Explicitly hand through on Intent-Start (coarse)
PARTIALLY:
Android-Context is explicitly assigned when Intents are started.

Not all types of Context are handled correctly yet.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 9c8e2e7c00 Provide additional checks before building Androids Livecycle.
AndroidPreFlightChecks provides some checkups on the settings before
bulding the Livecycle.
The checks have to be invoked explicitly and issue warnings in the log.
2014-04-11 17:53:12 +02:00
Tobias Blaschke 9c7a2eb975 Build coarse Android Environment
Governed by AndroidEntryPointManager.setDoBootSequence generate some
coarse Android-environment before starting the LiveCycle-Model.

Some action is taken to attach the Android-Context to Components - much
is still missing there though.
Thin context is mainly useful when starting Intents of an external App.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 0543761699 Read AndroidManifest.xml
Reading in this file is needed for determining targets of Intents.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 5ba668c8ae Android Intents: add special context
Whenever an Intent is encountered while building the CallGraph a
WALA-Context is generated for it. If a new Android-Component is started
and the Context is sufficient the start-function will call a new type of
model, the MicroModel.

The MicroModel resemples the livecycle of a single Android-Component.
2014-04-11 17:53:11 +02:00
Tobias Blaschke c33207d793 Android-Intents: context-free overrides
Whenever the start of an intent is encountered the start-function is
replaced by a call to UnknownTargetModel.

UnknownTargetModel will call a restricted android-model (i.e. one that calls only all
Activities). This restricted model is known as MiniModel.
It will also call ExternalModel which does nothing special.
2014-04-11 17:53:11 +02:00
Tobias Blaschke beb97a59e9 Add structure to Android Livecycle
The added structure is governed by an AbstractAndroidModel. When
"labels" are stepped over it may insert special handling code.
2014-04-11 17:53:11 +02:00
Tobias Blaschke 63616da3d2 Implement CB_HEURISTIC for locating EntryPoints
CB_HEURISTIC searches for all methods overwriting or implementing
methods of android that have not been covered by EP_HEURISTIC
2014-04-11 17:53:11 +02:00
Tobias Blaschke 2d9486b2a9 BUG: empty BB in InducedCFG.addExceptionalEdges
Current workaround is to ignore it
2014-04-11 17:53:11 +02:00
Tobias Blaschke 64a1eb0a60 Build basic Android-Livecycle (sequential)
Generate a synthetic AndroidModel in AndroidModelClass.
The model will contain Android EntryPoints in a sorted manner. However
no special handling (loops) are inserted yet.

Intents are not processed at all - thus have to be marked insecure.
2014-04-11 17:53:11 +02:00
Tobias Blaschke a05c823724 Add structures for parameters to Androids entrypoints
Parameters to Androids EntryPoint-Functions may be either marked CREATE
or REUSE. Added these markers and made them availabel through
AndroidEntryPointManager.
2014-04-11 17:53:11 +02:00
Tobias Blaschke b840b55600 AndroidModel: Add central config class
The class AndroidEntryPointManager will contain all configuration data
for building the Android Livecycle Model
2014-04-11 17:53:10 +02:00
Tobias Blaschke 1d527a607b Add hardcoded Android EntryPoints
Added a good bunch of specifications which functions to considder as
EntryPoints for Android Apps. These will be evaluated by
AndroidEntryPointLocator
2014-04-11 17:53:10 +02:00
Tobias Blaschke 1e9298f3d7 Locate Androids EntryPoints
Locating them will be based on a set of hardcoded specifications (next
commit) or by using heuristics.
2014-04-11 17:53:10 +02:00
Tobias Blaschke b8b1fca292 Constants for Android-Types
Added Android-Specific types as TypeName and TypeReference
2014-04-11 17:53:10 +02:00
Tobias Blaschke f8970f92b7 Enable variable-names in Synth. Methods
Using a SummarizedMethodWithNames instead of a normal one enables human
readable variable names in WALA-Synthetic methods. This should help
when debugging.
2014-04-11 17:53:10 +02:00
Tobias Blaschke ece98a0628 Tools to facilitate buildin Synth. Methods
Have a toolkit that aids in building WALA-synthetic methods by helping
to avoid common mistakes and managing SSA-Variables.

See bundled package-info.java for more detail
2014-04-11 17:53:10 +02:00
Tobias Blaschke 34faac169d Fixes on AndroidAnalysisScope
Depending on the method used generating an AnalysisScope failed for
Android-Apps. Especially depending on wheater data was used from a
jar-resource or depending on exclusions.txt
2014-04-11 17:51:59 +02:00
Tobias Blaschke 6c5f243ea5 Add GoTo-instruction for Synt. Methods (limited)
Implemented the GoTo istruction reachable through the
JavaInstructionFactory.

Caution:
- It has to be asshured manually that a basic block starts at the target
- One may not jump to a Phi-Instruction
2014-04-11 17:50:17 +02:00
Tobias Blaschke dcf5cd4a1c On progress monitoring
Small changes on progrss monitoring that enable having an actual
progress-meter instead of just having heart-beat information.
2014-04-11 17:50:17 +02:00
Tobias Blaschke 9ba0c06cf3 Add misc helper functions
Added small helper functions that may provide handy
2014-04-11 17:50:17 +02:00
Tobias Blaschke 964a0d86b9 Debug-Output only
No changes on the inner workings, only provided better Debug-Messages.
2014-04-11 17:50:17 +02:00
Julian Dolby 63a7570bcf require 1.7 SE 2014-04-11 10:00:39 -04:00
Julian Dolby 99512c5cd0 uuse PrinterWriter; make DOM model optional 2014-04-11 10:00:05 -04:00
Julian Dolby 26684af676 bug fix for finding primitive objects 2014-04-11 09:58:34 -04:00
Julian Dolby fe5ad51acd 1.6 SE 2014-04-11 09:28:36 -04:00
Julian Dolby 4e9748d4b9 implemented some more featutres. 2014-04-11 09:27:50 -04:00
Julian Dolby f8921c4389 static type for inverter of known numbered graph 2014-04-11 09:26:37 -04:00
Martin Mohr 54ec3410e7 don't add jdk libs to android analysis scope
CAUTION: Now you have to make sure that the provided android lib actually contains all standard
java classes (e.g. java.lang.Object); WALA will complain and crash if this is not the case
2014-03-31 11:20:17 +02:00
Martin Mohr a01d1a969f change default for logging 2014-03-31 11:20:00 +02:00
Julian Dolby 542f4055d9 fix. not sure why i do not see this failure when running the test on my laptop 2014-03-17 22:27:45 -04:00
Julian Dolby a3a3e7fbe7 new graph implementation for incremental graph extension 2014-03-17 22:09:58 -04:00
Julian Dolby b04a3f9b35 try new way to find classpath entries for travis ci 2014-03-17 10:09:48 -04:00
Julian Dolby 371695506d avoid running on travis for now 2014-03-16 22:29:54 -04:00
Julian Dolby b422fd500e try to find jar file for travis tests 2014-03-16 22:14:36 -04:00
Julian Dolby 95c13203de try to find jar file for travis tests 2014-03-16 22:01:02 -04:00
Julian Dolby 656d307e15 constant instructions for MethodHandles 2014-03-16 18:07:58 -04:00
Julian Dolby c0984fd3e5 allow access in subclasses 2014-03-16 18:06:47 -04:00
Julian Dolby 893f4b7308 type in CAst var decls 2014-03-16 18:05:49 -04:00
Julian Dolby bfd999e03b rename dynamic cg test 2014-03-16 18:04:21 -04:00
Julian Dolby 6b5a0825fb some minimal support for Java 7 constant pool entries 2014-03-16 17:30:17 -04:00
Juergen Graf 561472dfe5 new java versions in osx have different java.home - fix autodetection 2014-03-10 14:43:29 +01:00
Julian Dolby 7b62150502 Merge branch 'master' of https://github.com/wala/WALA 2014-03-06 14:37:38 -05:00
Julian Dolby 9a8f806939 type-o 2014-03-06 14:37:36 -05:00
Julian Dolby c012401ad1 fix type-o 2014-03-03 14:37:16 -05:00
Julian Dolby 3bc0ad9a2c move java 7 dependent code to core, so util works with java 6 2014-03-03 14:30:19 -05:00
sjfink 6549723da1 fix spelling errors 2014-03-03 11:07:02 -08:00
Martin Mohr db263ecefc additional 'pruning policy' to not prune anything; could be useful if one wants to temporarily switch off pruning without changing too much code 2014-02-25 16:59:08 +01:00